Skip to content

Commit

Permalink
Bug 1097740 - use NS_INLINE_DECL_REFCOUNTING for Fake_MediaStreamTrac…
Browse files Browse the repository at this point in the history
…k in FakeMediaStreams.h; r=jesup
  • Loading branch information
froydnj committed Nov 12, 2014
1 parent 7d53346 commit f488b50
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions media/webrtc/signaling/test/FakeMediaStreams.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#include "nsComponentManagerUtils.h"
#include "nsIComponentManager.h"
#include "nsIComponentRegistrar.h"
#include "nsISupportsImpl.h"

// #includes from MediaStream.h
#include "mozilla/Mutex.h"
#include "mozilla/RefPtr.h"
#include "AudioSegment.h"
#include "MediaSegment.h"
#include "StreamBuffer.h"
Expand Down Expand Up @@ -215,9 +215,11 @@ class Fake_SourceMediaStream : public Fake_MediaStream {

class Fake_DOMMediaStream;

class Fake_MediaStreamTrack : public mozilla::RefCounted<Fake_MediaStreamTrack>
class Fake_MediaStreamTrack
{
public:
NS_INLINE_DECL_REFCOUNTING(Fake_MediaStreamTrack)

explicit Fake_MediaStreamTrack(bool aIsVideo) : mIsVideo (aIsVideo) {}
mozilla::TrackID GetTrackID() { return mIsVideo ? 1 : 0; }
Fake_DOMMediaStream *GetStream() { return nullptr; }
Expand All @@ -230,6 +232,8 @@ class Fake_MediaStreamTrack : public mozilla::RefCounted<Fake_MediaStreamTrack>
return mIsVideo? nullptr : this;
}
private:
~Fake_MediaStreamTrack() {}

const bool mIsVideo;
};

Expand Down

0 comments on commit f488b50

Please sign in to comment.