Bug 1097740 - use NS_INLINE_DECL_REFCOUNTING for Fake_MediaStreamTrack in FakeMediaStreams.h; r=jesup

This commit is contained in:
Nathan Froyd 2014-11-12 11:07:27 -05:00
parent f7cb16fe38
commit b1cd8c83e4

View File

@ -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"
@ -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; }
@ -230,6 +232,8 @@ public:
return mIsVideo? nullptr : this;
}
private:
~Fake_MediaStreamTrack() {}
const bool mIsVideo;
};