Bug 1060980 - Fix more bad implicit constructors in the media code; r=roc

--HG--
extra : rebase_source : 14da50f7d2e37e04452445dea575ea4d582e8efd
This commit is contained in:
Ehsan Akhgari 2014-08-31 23:50:23 -04:00
Родитель 1541d1e681
Коммит f76451d2e9
101 изменённых файлов: 152 добавлений и 150 удалений

Просмотреть файл

@ -181,7 +181,7 @@ class MetadataEventRunner : public nsRunnable
class RemoveMediaTracksEventRunner : public nsRunnable
{
public:
RemoveMediaTracksEventRunner(AbstractMediaDecoder* aDecoder)
explicit RemoveMediaTracksEventRunner(AbstractMediaDecoder* aDecoder)
: mDecoder(aDecoder)
{}

Просмотреть файл

@ -15,7 +15,7 @@ namespace mozilla {
class AudioCompactor
{
public:
AudioCompactor(MediaQueue<AudioData>& aQueue)
explicit AudioCompactor(MediaQueue<AudioData>& aQueue)
: mQueue(aQueue)
{ }

Просмотреть файл

@ -128,7 +128,7 @@ private:
class MixerCallback : public LinkedListElement<MixerCallback>
{
public:
MixerCallback(MixerCallbackReceiver* aReceiver)
explicit MixerCallback(MixerCallbackReceiver* aReceiver)
: mReceiver(aReceiver)
{ }
MixerCallbackReceiver* mReceiver;

Просмотреть файл

@ -19,7 +19,7 @@ namespace mozilla {
template<typename T>
class SharedChannelArrayBuffer : public ThreadSharedObject {
public:
SharedChannelArrayBuffer(nsTArray<nsTArray<T> >* aBuffers)
explicit SharedChannelArrayBuffer(nsTArray<nsTArray<T> >* aBuffers)
{
mBuffers.SwapElements(*aBuffers);
}

Просмотреть файл

@ -37,7 +37,7 @@ class FrameHistory;
class AudioClock
{
public:
AudioClock(AudioStream* aStream);
explicit AudioClock(AudioStream* aStream);
// Initialize the clock with the current AudioStream. Need to be called
// before querying the clock. Called on the audio thread.
void Init();

Просмотреть файл

@ -59,7 +59,7 @@ NS_INTERFACE_MAP_END_INHERITING(DOMMediaStream)
class DOMMediaStream::StreamListener : public MediaStreamListener {
public:
StreamListener(DOMMediaStream* aStream)
explicit StreamListener(DOMMediaStream* aStream)
: mStream(aStream)
{}

Просмотреть файл

@ -191,7 +191,7 @@ public:
class OnTracksAvailableCallback {
public:
OnTracksAvailableCallback(uint8_t aExpectedTracks = 0)
explicit OnTracksAvailableCallback(uint8_t aExpectedTracks = 0)
: mExpectedTracks(aExpectedTracks) {}
virtual ~OnTracksAvailableCallback() {}
virtual void NotifyTracksAvailable(DOMMediaStream* aStream) = 0;
@ -321,7 +321,7 @@ class DOMAudioNodeMediaStream : public DOMMediaStream
{
typedef dom::AudioNode AudioNode;
public:
DOMAudioNodeMediaStream(AudioNode* aNode);
explicit DOMAudioNodeMediaStream(AudioNode* aNode);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DOMAudioNodeMediaStream, DOMMediaStream)

Просмотреть файл

@ -26,7 +26,7 @@ class ReentrantMonitor;
class EncodedBufferCache
{
public:
EncodedBufferCache(uint32_t aMaxMemoryStorage)
explicit EncodedBufferCache(uint32_t aMaxMemoryStorage)
: mFD(nullptr),
mMutex("EncodedBufferCache.Data.Mutex"),
mDataSize(0),

Просмотреть файл

@ -93,7 +93,7 @@ public:
// This block is waiting in memory to be written.
// Stores a copy of the block, so we can write it asynchronously.
BlockChange(const uint8_t* aData)
explicit BlockChange(const uint8_t* aData)
: mSourceBlockIndex(-1)
{
mData = new uint8_t[BLOCK_SIZE];
@ -102,7 +102,7 @@ public:
// This block's contents are located in another file
// block, i.e. this block has been moved.
BlockChange(int32_t aSourceBlockIndex)
explicit BlockChange(int32_t aSourceBlockIndex)
: mSourceBlockIndex(aSourceBlockIndex) {}
nsAutoArrayPtr<uint8_t> mData;

Просмотреть файл

@ -706,7 +706,7 @@ AudioCallbackDriver::DataCallback(AudioDataValue* aBuffer, long aFrames)
return aFrames;
}
DebugOnly<AutoInCallback> aic(this);
DebugOnly<AutoInCallback> aic(AutoInCallback(this));
if (mStateComputedTime == 0) {
MonitorAutoLock mon(mGraphImpl->GetMonitor());

Просмотреть файл

@ -72,7 +72,7 @@ class AudioCallbackDriver;
class GraphDriver
{
public:
GraphDriver(MediaStreamGraphImpl* aGraphImpl);
explicit GraphDriver(MediaStreamGraphImpl* aGraphImpl);
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GraphDriver);
/* When the graph wakes up to do an iteration, this returns the range of time
@ -236,7 +236,7 @@ class MediaStreamGraphInitThreadRunnable;
class ThreadedDriver : public GraphDriver
{
public:
ThreadedDriver(MediaStreamGraphImpl* aGraphImpl);
explicit ThreadedDriver(MediaStreamGraphImpl* aGraphImpl);
virtual ~ThreadedDriver();
virtual void Start() MOZ_OVERRIDE;
virtual void Stop() MOZ_OVERRIDE;
@ -262,7 +262,7 @@ protected:
class SystemClockDriver : public ThreadedDriver
{
public:
SystemClockDriver(MediaStreamGraphImpl* aGraphImpl);
explicit SystemClockDriver(MediaStreamGraphImpl* aGraphImpl);
virtual ~SystemClockDriver();
virtual void GetIntervalForIteration(GraphTime& aFrom,
GraphTime& aTo) MOZ_OVERRIDE;
@ -321,8 +321,8 @@ class AudioCallbackDriver : public GraphDriver,
public MixerCallbackReceiver
{
public:
AudioCallbackDriver(MediaStreamGraphImpl* aGraphImpl,
dom::AudioChannel aChannel = dom::AudioChannel::Normal);
explicit AudioCallbackDriver(MediaStreamGraphImpl* aGraphImpl,
dom::AudioChannel aChannel = dom::AudioChannel::Normal);
virtual ~AudioCallbackDriver();
virtual void Destroy() MOZ_OVERRIDE;
@ -429,7 +429,7 @@ private:
struct AutoInCallback
{
AutoInCallback(AudioCallbackDriver* aDriver);
explicit AutoInCallback(AudioCallbackDriver* aDriver);
~AutoInCallback();
AudioCallbackDriver* mDriver;
};

Просмотреть файл

@ -103,7 +103,7 @@ private:
class MP3FrameParser
{
public:
MP3FrameParser(int64_t aLength=-1);
explicit MP3FrameParser(int64_t aLength=-1);
bool IsMP3() {
MutexAutoLock mon(mLock);

Просмотреть файл

@ -223,7 +223,7 @@ public:
*/
class ResourceStreamIterator {
public:
ResourceStreamIterator(int64_t aResourceID) :
explicit ResourceStreamIterator(int64_t aResourceID) :
mResourceID(aResourceID), mNext(0) {}
MediaCacheStream* Next()
{

Просмотреть файл

@ -194,7 +194,7 @@ public:
// aClient provides the underlying transport that cache will use to read
// data for this stream.
MediaCacheStream(ChannelMediaResource* aClient);
explicit MediaCacheStream(ChannelMediaResource* aClient);
~MediaCacheStream();
// Set up this stream with the cache. Can fail on OOM. One
@ -396,7 +396,7 @@ private:
private:
struct Entry : public nsUint32HashKey {
Entry(KeyTypePointer aKey) : nsUint32HashKey(aKey) { }
explicit Entry(KeyTypePointer aKey) : nsUint32HashKey(aKey) { }
Entry(const Entry& toCopy) : nsUint32HashKey(&toCopy.GetKey()),
mNextBlock(toCopy.mNextBlock), mPrevBlock(toCopy.mPrevBlock) {}

Просмотреть файл

@ -1093,7 +1093,7 @@ private:
class RestrictedAccessMonitor
{
public:
RestrictedAccessMonitor(const char* aName) :
explicit RestrictedAccessMonitor(const char* aName) :
mReentrantMonitor(aName)
{
MOZ_COUNT_CTOR(RestrictedAccessMonitor);

Просмотреть файл

@ -31,7 +31,7 @@ class MediaDecoderReader {
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaDecoderReader)
MediaDecoderReader(AbstractMediaDecoder* aDecoder);
explicit MediaDecoderReader(AbstractMediaDecoder* aDecoder);
// Initializes the reader, returns NS_OK on success, or NS_ERROR_FAILURE
// on failure.

Просмотреть файл

@ -364,7 +364,7 @@ protected:
class WakeDecoderRunnable : public nsRunnable {
public:
WakeDecoderRunnable(MediaDecoderStateMachine* aSM)
explicit WakeDecoderRunnable(MediaDecoderStateMachine* aSM)
: mMutex("WakeDecoderRunnable"), mStateMachine(aSM) {}
NS_IMETHOD Run() MOZ_OVERRIDE
{

Просмотреть файл

@ -92,7 +92,7 @@ class MediaRecorder::Session: public nsIObserver
class PushBlobRunnable : public nsRunnable
{
public:
PushBlobRunnable(Session* aSession)
explicit PushBlobRunnable(Session* aSession)
: mSession(aSession)
{ }
@ -154,7 +154,7 @@ class MediaRecorder::Session: public nsIObserver
class ExtractRunnable : public nsRunnable
{
public:
ExtractRunnable(Session* aSession)
explicit ExtractRunnable(Session* aSession)
: mSession(aSession) {}
~ExtractRunnable()
@ -190,7 +190,7 @@ class MediaRecorder::Session: public nsIObserver
class TracksAvailableCallback : public DOMMediaStream::OnTracksAvailableCallback
{
public:
TracksAvailableCallback(Session *aSession)
explicit TracksAvailableCallback(Session *aSession)
: mSession(aSession) {}
virtual void NotifyTracksAvailable(DOMMediaStream* aStream)
{
@ -220,7 +220,7 @@ class MediaRecorder::Session: public nsIObserver
class DestroyRunnable : public nsRunnable
{
public:
DestroyRunnable(Session* aSession)
explicit DestroyRunnable(Session* aSession)
: mSession(aSession) {}
NS_IMETHODIMP Run()

Просмотреть файл

@ -56,7 +56,7 @@ class MediaChannelStatistics {
public:
MediaChannelStatistics() { Reset(); }
MediaChannelStatistics(MediaChannelStatistics * aCopyFrom)
explicit MediaChannelStatistics(MediaChannelStatistics * aCopyFrom)
{
MOZ_ASSERT(aCopyFrom);
mAccumulatedBytes = aCopyFrom->mAccumulatedBytes;
@ -136,7 +136,7 @@ public:
NS_ASSERTION(mStart < mEnd, "Range should end after start!");
}
MediaByteRange(TimestampedMediaByteRange& aByteRange);
explicit MediaByteRange(TimestampedMediaByteRange& aByteRange);
bool IsNull() const {
return mStart == 0 && mEnd == 0;
@ -624,7 +624,7 @@ public:
{
~Listener() {}
public:
Listener(ChannelMediaResource* aResource) : mResource(aResource) {}
explicit Listener(ChannelMediaResource* aResource) : mResource(aResource) {}
NS_DECL_ISUPPORTS
NS_DECL_NSIREQUESTOBSERVER

Просмотреть файл

@ -116,7 +116,7 @@ public:
}
protected:
MediaSegment(Type aType) : mDuration(0), mType(aType)
explicit MediaSegment(Type aType) : mDuration(0), mType(aType)
{
MOZ_COUNT_CTOR(MediaSegment);
}
@ -220,7 +220,7 @@ public:
class ChunkIterator {
public:
ChunkIterator(MediaSegmentBase<C, Chunk>& aSegment)
explicit ChunkIterator(MediaSegmentBase<C, Chunk>& aSegment)
: mSegment(aSegment), mIndex(0) {}
bool IsEnded() { return mIndex >= mSegment.mChunks.Length(); }
void Next() { ++mIndex; }
@ -257,7 +257,7 @@ public:
}
protected:
MediaSegmentBase(Type aType) : MediaSegment(aType) {}
explicit MediaSegmentBase(Type aType) : MediaSegment(aType) {}
/**
* Appends the contents of aSource to this segment, clearing aSource.

Просмотреть файл

@ -1448,7 +1448,7 @@ namespace {
class MediaStreamGraphShutDownRunnable : public nsRunnable {
public:
MediaStreamGraphShutDownRunnable(MediaStreamGraphImpl* aGraph)
explicit MediaStreamGraphShutDownRunnable(MediaStreamGraphImpl* aGraph)
: mGraph(aGraph)
{}
NS_IMETHOD Run()
@ -1516,7 +1516,7 @@ private:
*/
class CreateMessage : public ControlMessage {
public:
CreateMessage(MediaStream* aStream) : ControlMessage(aStream) {}
explicit CreateMessage(MediaStream* aStream) : ControlMessage(aStream) {}
virtual void Run() MOZ_OVERRIDE
{
mStream->GraphImpl()->AddStream(mStream);
@ -1906,7 +1906,7 @@ MediaStream::Destroy()
class Message : public ControlMessage {
public:
Message(MediaStream* aStream) : ControlMessage(aStream) {}
explicit Message(MediaStream* aStream) : ControlMessage(aStream) {}
virtual void Run()
{
mStream->RemoveAllListenersImpl();
@ -2531,7 +2531,7 @@ MediaInputPort::Destroy()
{
class Message : public ControlMessage {
public:
Message(MediaInputPort* aPort)
explicit Message(MediaInputPort* aPort)
: ControlMessage(nullptr), mPort(aPort) {}
virtual void Run()
{
@ -2576,7 +2576,7 @@ ProcessedMediaStream::AllocateInputPort(MediaStream* aStream, uint32_t aFlags,
// the main thread, and one for the MediaStreamGraph.
class Message : public ControlMessage {
public:
Message(MediaInputPort* aPort)
explicit Message(MediaInputPort* aPort)
: ControlMessage(aPort->GetDestination()),
mPort(aPort) {}
virtual void Run()
@ -2604,7 +2604,7 @@ ProcessedMediaStream::Finish()
{
class Message : public ControlMessage {
public:
Message(ProcessedMediaStream* aStream)
explicit Message(ProcessedMediaStream* aStream)
: ControlMessage(aStream) {}
virtual void Run()
{
@ -2776,7 +2776,7 @@ NS_IMPL_ISUPPORTS(MediaStreamGraphImpl, nsIMemoryReporter)
struct ArrayClearer
{
ArrayClearer(nsTArray<AudioNodeSizes>& aArray) : mArray(aArray) {}
explicit ArrayClearer(nsTArray<AudioNodeSizes>& aArray) : mArray(aArray) {}
~ArrayClearer() { mArray.Clear(); }
nsTArray<AudioNodeSizes>& mArray;
};

Просмотреть файл

@ -310,7 +310,7 @@ class MediaStream : public mozilla::LinkedListElement<MediaStream> {
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaStream)
MediaStream(DOMMediaStream* aWrapper);
explicit MediaStream(DOMMediaStream* aWrapper);
protected:
// Protected destructor, to discourage deletion outside of Release():
@ -580,7 +580,7 @@ protected:
// Client-set volume of this stream
struct AudioOutput {
AudioOutput(void* aKey) : mKey(aKey), mVolume(1.0f) {}
explicit AudioOutput(void* aKey) : mKey(aKey), mVolume(1.0f) {}
void* mKey;
float mVolume;
};
@ -682,7 +682,7 @@ protected:
*/
class SourceMediaStream : public MediaStream {
public:
SourceMediaStream(DOMMediaStream* aWrapper) :
explicit SourceMediaStream(DOMMediaStream* aWrapper) :
MediaStream(aWrapper),
mLastConsumptionState(MediaStreamListener::NOT_CONSUMED),
mMutex("mozilla::media::SourceMediaStream"),
@ -1014,7 +1014,7 @@ private:
*/
class ProcessedMediaStream : public MediaStream {
public:
ProcessedMediaStream(DOMMediaStream* aWrapper)
explicit ProcessedMediaStream(DOMMediaStream* aWrapper)
: MediaStream(aWrapper), mAutofinish(false)
{}

Просмотреть файл

@ -62,7 +62,7 @@ MediaTaskQueue::DispatchLocked(TemporaryRef<nsIRunnable> aRunnable,
class MediaTaskQueueSyncRunnable : public nsRunnable {
public:
MediaTaskQueueSyncRunnable(TemporaryRef<nsIRunnable> aRunnable)
explicit MediaTaskQueueSyncRunnable(TemporaryRef<nsIRunnable> aRunnable)
: mRunnable(aRunnable)
, mMonitor("MediaTaskQueueSyncRunnable")
, mDone(false)

Просмотреть файл

@ -29,7 +29,7 @@ class MediaTaskQueue MOZ_FINAL {
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaTaskQueue)
MediaTaskQueue(TemporaryRef<SharedThreadPool> aPool);
explicit MediaTaskQueue(TemporaryRef<SharedThreadPool> aPool);
nsresult Dispatch(TemporaryRef<nsIRunnable> aRunnable);
@ -89,7 +89,7 @@ private:
class MOZ_STACK_CLASS AutoSetFlushing
{
public:
AutoSetFlushing(MediaTaskQueue* aTaskQueue) : mTaskQueue(aTaskQueue)
explicit AutoSetFlushing(MediaTaskQueue* aTaskQueue) : mTaskQueue(aTaskQueue)
{
mTaskQueue->mQueueMonitor.AssertCurrentThreadOwns();
mTaskQueue->mIsFlushing = true;
@ -109,7 +109,7 @@ private:
class Runner : public nsRunnable {
public:
Runner(MediaTaskQueue* aQueue)
explicit Runner(MediaTaskQueue* aQueue)
: mQueue(aQueue)
{
}

Просмотреть файл

@ -28,7 +28,7 @@ class MediaTrackList;
class MediaTrackListListener
{
public:
MediaTrackListListener(MediaTrackList* aMediaTrackList)
explicit MediaTrackListListener(MediaTrackList* aMediaTrackList)
: mMediaTrackList(aMediaTrackList) {};
~MediaTrackListListener()

Просмотреть файл

@ -206,7 +206,7 @@ public:
{
~Listener() {}
public:
Listener(RtspMediaResource* aResource) : mResource(aResource) {}
explicit Listener(RtspMediaResource* aResource) : mResource(aResource) {}
NS_DECL_ISUPPORTS
NS_DECL_NSIINTERFACEREQUESTOR

Просмотреть файл

@ -284,7 +284,7 @@ public:
/**
* Iterate through the tracks of aBuffer in order of ID.
*/
TrackIter(const StreamBuffer& aBuffer) :
explicit TrackIter(const StreamBuffer& aBuffer) :
mBuffer(&aBuffer.mTracks), mIndex(0), mMatchType(false) {}
/**
* Iterate through the tracks of aBuffer with type aType, in order of ID.

Просмотреть файл

@ -26,7 +26,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TextTrackCueList)
// TextTrackCueList WebIDL
TextTrackCueList(nsISupports* aParent);
explicit TextTrackCueList(nsISupports* aParent);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;

Просмотреть файл

@ -26,7 +26,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TextTrackList, DOMEventTargetHelper)
TextTrackList(nsPIDOMWindow* aOwnerWindow);
explicit TextTrackList(nsPIDOMWindow* aOwnerWindow);
TextTrackList(nsPIDOMWindow* aOwnerWindow, TextTrackManager* aTextTrackManager);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;

Просмотреть файл

@ -42,7 +42,7 @@ public:
return mParent;
}
TextTrackRegion(nsISupports* aGlobal);
explicit TextTrackRegion(nsISupports* aGlobal);
/** WebIDL Methods. */

Просмотреть файл

@ -51,7 +51,7 @@ protected:
template <typename Time, typename T, uint32_t ReservedChanges>
class TimeVarying : public TimeVaryingBase {
public:
TimeVarying(const T& aInitial) : mCurrent(aInitial) {}
explicit TimeVarying(const T& aInitial) : mCurrent(aInitial) {}
/**
* This constructor can only be called if mCurrent has a no-argument
* constructor.

Просмотреть файл

@ -24,7 +24,7 @@ namespace mozilla {
*/
class TrackUnionStream : public ProcessedMediaStream {
public:
TrackUnionStream(DOMMediaStream* aWrapper) :
explicit TrackUnionStream(DOMMediaStream* aWrapper) :
ProcessedMediaStream(aWrapper),
mFilterCallback(nullptr)
{}

Просмотреть файл

@ -82,7 +82,7 @@ private:
class ShutdownThreadEvent : public nsRunnable
{
public:
ShutdownThreadEvent(nsIThread* aThread) : mThread(aThread) {}
explicit ShutdownThreadEvent(nsIThread* aThread) : mThread(aThread) {}
~ShutdownThreadEvent() {}
NS_IMETHOD Run() MOZ_OVERRIDE {
mThread->Shutdown();
@ -96,7 +96,7 @@ private:
template<class T>
class DeleteObjectTask: public nsRunnable {
public:
DeleteObjectTask(nsAutoPtr<T>& aObject)
explicit DeleteObjectTask(nsAutoPtr<T>& aObject)
: mObject(aObject)
{
}

Просмотреть файл

@ -36,7 +36,7 @@ class WebVTTListener MOZ_FINAL : public nsIWebVTTListener,
nsIStreamListener)
public:
WebVTTListener(HTMLTrackElement* aElement);
explicit WebVTTListener(HTMLTrackElement* aElement);
/**
* Loads the WebVTTListener. Must call this in order for the listener to be

Просмотреть файл

@ -16,7 +16,7 @@ namespace mozilla {
class AppleMP3Reader : public MediaDecoderReader
{
public:
AppleMP3Reader(AbstractMediaDecoder *aDecoder);
explicit AppleMP3Reader(AbstractMediaDecoder *aDecoder);
virtual ~AppleMP3Reader() MOZ_OVERRIDE;
virtual nsresult Init(MediaDecoderReader* aCloneDonor) MOZ_OVERRIDE;

Просмотреть файл

@ -248,7 +248,7 @@ private:
template<class Type>
class MainThreadOnlyRawPtr {
public:
MainThreadOnlyRawPtr(Type* aPtr)
explicit MainThreadOnlyRawPtr(Type* aPtr)
: mPtr(aPtr)
{
MOZ_ASSERT(NS_IsMainThread());

Просмотреть файл

@ -29,7 +29,7 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(MediaEncryptedEvent, Event)
protected:
virtual ~MediaEncryptedEvent();
MediaEncryptedEvent(EventTarget* aOwner);
explicit MediaEncryptedEvent(EventTarget* aOwner);
nsString mInitDataType;
JS::Heap<JSObject*> mInitData;

Просмотреть файл

@ -29,7 +29,7 @@ class MP4Stream;
class MP4Reader : public MediaDecoderReader
{
public:
MP4Reader(AbstractMediaDecoder* aDecoder);
explicit MP4Reader(AbstractMediaDecoder* aDecoder);
virtual ~MP4Reader();

Просмотреть файл

@ -19,7 +19,7 @@ class GMPAudioDecoderChild : public PGMPAudioDecoderChild,
public GMPAudioDecoderCallback
{
public:
GMPAudioDecoderChild(GMPChild* aPlugin);
explicit GMPAudioDecoderChild(GMPChild* aPlugin);
virtual ~GMPAudioDecoderChild();
void Init(GMPAudioDecoder* aDecoder);

Просмотреть файл

@ -24,7 +24,7 @@ class GMPAudioDecoderParent MOZ_FINAL : public GMPAudioDecoderProxy
public:
NS_INLINE_DECL_REFCOUNTING(GMPAudioDecoderParent)
GMPAudioDecoderParent(GMPParent *aPlugin);
explicit GMPAudioDecoderParent(GMPParent *aPlugin);
nsresult Shutdown();

Просмотреть файл

@ -20,8 +20,8 @@ namespace gmp {
class GMPAudioSamplesImpl : public GMPAudioSamples {
public:
GMPAudioSamplesImpl(GMPAudioFormat aFormat);
GMPAudioSamplesImpl(const GMPAudioEncodedSampleData& aData);
explicit GMPAudioSamplesImpl(GMPAudioFormat aFormat);
explicit GMPAudioSamplesImpl(const GMPAudioEncodedSampleData& aData);
GMPAudioSamplesImpl(mp4_demuxer::MP4Sample* aSample,
uint32_t aChannels,
uint32_t aRate);

Просмотреть файл

@ -21,7 +21,7 @@ class GMPDecryptorChild : public GMPDecryptorCallback
, public PGMPDecryptorChild
{
public:
GMPDecryptorChild(GMPChild* aPlugin);
explicit GMPDecryptorChild(GMPChild* aPlugin);
~GMPDecryptorChild();
void Init(GMPDecryptor* aSession);

Просмотреть файл

@ -25,7 +25,7 @@ class GMPDecryptorParent MOZ_FINAL : public GMPDecryptorProxy
public:
NS_INLINE_DECL_REFCOUNTING(GMPDecryptorParent)
GMPDecryptorParent(GMPParent *aPlugin);
explicit GMPDecryptorParent(GMPParent *aPlugin);
// GMPDecryptorProxy
virtual nsresult Init(GMPDecryptorProxyCallback* aCallback) MOZ_OVERRIDE;

Просмотреть файл

@ -18,8 +18,8 @@ class GMPEncryptedBufferDataImpl : public GMPEncryptedBufferMetadata {
private:
typedef mp4_demuxer::CryptoSample CryptoSample;
public:
GMPEncryptedBufferDataImpl(const CryptoSample& aCrypto);
GMPEncryptedBufferDataImpl(const GMPDecryptionData& aData);
explicit GMPEncryptedBufferDataImpl(const CryptoSample& aCrypto);
explicit GMPEncryptedBufferDataImpl(const GMPDecryptionData& aData);
virtual ~GMPEncryptedBufferDataImpl();
void RelinquishData(GMPDecryptionData& aData);

Просмотреть файл

@ -29,7 +29,7 @@ class Runnable MOZ_FINAL
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(Runnable)
Runnable(GMPTask* aTask)
explicit Runnable(GMPTask* aTask)
: mTask(aTask)
{
MOZ_ASSERT(mTask);

Просмотреть файл

@ -17,7 +17,7 @@ protected:
typedef mozilla::ipc::ProcessChild ProcessChild;
public:
GMPProcessChild(ProcessHandle parentHandle);
explicit GMPProcessChild(ProcessHandle parentHandle);
~GMPProcessChild();
virtual bool Init() MOZ_OVERRIDE;

Просмотреть файл

@ -22,7 +22,7 @@ namespace gmp {
class GMPProcessParent MOZ_FINAL : public mozilla::ipc::GeckoChildProcessHost
{
public:
GMPProcessParent(const std::string& aGMPPath);
explicit GMPProcessParent(const std::string& aGMPPath);
~GMPProcessParent();
// Synchronously launch the plugin process. If the process fails to launch

Просмотреть файл

@ -10,6 +10,7 @@
#include "mozIGeckoMediaPluginService.h"
#include "nsIObserver.h"
#include "nsTArray.h"
#include "mozilla/Attributes.h"
#include "mozilla/Monitor.h"
#include "nsString.h"
#include "nsCOMPtr.h"
@ -93,7 +94,7 @@ private:
template<typename T>
class MainThreadOnly {
public:
MainThreadOnly(T aValue)
MOZ_IMPLICIT MainThreadOnly(T aValue)
: mValue(aValue)
{}
operator T&() {

Просмотреть файл

@ -51,7 +51,7 @@ protected:
class GMPSharedMemManager
{
public:
GMPSharedMemManager(GMPSharedMem *aData) : mData(aData) {}
explicit GMPSharedMemManager(GMPSharedMem *aData) : mData(aData) {}
virtual ~GMPSharedMemManager() {}
virtual bool MgrAllocShmem(GMPSharedMem::GMPMemoryClasses aClass, size_t aSize,

Просмотреть файл

@ -54,7 +54,7 @@ class GMPStorageChild : public PGMPStorageChild
public:
NS_INLINE_DECL_REFCOUNTING(GMPStorageChild)
GMPStorageChild(GMPChild* aPlugin);
explicit GMPStorageChild(GMPChild* aPlugin);
GMPErr CreateRecord(const nsCString& aRecordName,
GMPRecord** aOutRecord,

Просмотреть файл

@ -23,7 +23,7 @@ class GMPTimerChild : public PGMPTimerChild
public:
NS_INLINE_DECL_REFCOUNTING(GMPTimerChild)
GMPTimerChild(GMPChild* aPlugin);
explicit GMPTimerChild(GMPChild* aPlugin);
GMPErr SetTimer(GMPTask* aTask, int64_t aTimeoutMS);

Просмотреть файл

@ -21,7 +21,7 @@ namespace gmp {
class GMPTimerParent : public PGMPTimerParent {
public:
NS_INLINE_DECL_REFCOUNTING(GMPTimerParent)
GMPTimerParent(nsIThread* aGMPThread);
explicit GMPTimerParent(nsIThread* aGMPThread);
void Shutdown();

Просмотреть файл

@ -23,7 +23,7 @@ class GMPVideoDecoderChild : public PGMPVideoDecoderChild,
public GMPSharedMemManager
{
public:
GMPVideoDecoderChild(GMPChild* aPlugin);
explicit GMPVideoDecoderChild(GMPChild* aPlugin);
virtual ~GMPVideoDecoderChild();
void Init(GMPVideoDecoder* aDecoder);

Просмотреть файл

@ -26,7 +26,7 @@ class GMPVideoDecoderParent MOZ_FINAL : public PGMPVideoDecoderParent
public:
NS_INLINE_DECL_REFCOUNTING(GMPVideoDecoderParent)
GMPVideoDecoderParent(GMPParent *aPlugin);
explicit GMPVideoDecoderParent(GMPParent *aPlugin);
GMPVideoHostImpl& Host();
nsresult Shutdown();

Просмотреть файл

@ -50,7 +50,7 @@ class GMPVideoEncodedFrameImpl: public GMPVideoEncodedFrame
{
friend struct IPC::ParamTraits<mozilla::gmp::GMPVideoEncodedFrameImpl>;
public:
GMPVideoEncodedFrameImpl(GMPVideoHostImpl* aHost);
explicit GMPVideoEncodedFrameImpl(GMPVideoHostImpl* aHost);
GMPVideoEncodedFrameImpl(const GMPVideoEncodedFrameData& aFrameData, GMPVideoHostImpl* aHost);
virtual ~GMPVideoEncodedFrameImpl();

Просмотреть файл

@ -22,7 +22,7 @@ class GMPVideoEncoderChild : public PGMPVideoEncoderChild,
public GMPSharedMemManager
{
public:
GMPVideoEncoderChild(GMPChild* aPlugin);
explicit GMPVideoEncoderChild(GMPChild* aPlugin);
virtual ~GMPVideoEncoderChild();
void Init(GMPVideoEncoder* aEncoder);

Просмотреть файл

@ -26,7 +26,7 @@ class GMPVideoEncoderParent : public GMPVideoEncoderProxy,
public:
NS_INLINE_DECL_REFCOUNTING(GMPVideoEncoderParent)
GMPVideoEncoderParent(GMPParent *aPlugin);
explicit GMPVideoEncoderParent(GMPParent *aPlugin);
GMPVideoHostImpl& Host();
void Shutdown();

Просмотреть файл

@ -22,7 +22,7 @@ class GMPVideoEncodedFrameImpl;
class GMPVideoHostImpl : public GMPVideoHost
{
public:
GMPVideoHostImpl(GMPSharedMemManager* aSharedMemMgr);
explicit GMPVideoHostImpl(GMPSharedMemManager* aSharedMemMgr);
virtual ~GMPVideoHostImpl();
// Used for shared memory allocation and deallocation.

Просмотреть файл

@ -19,7 +19,7 @@ class GMPPlaneImpl : public GMPPlane
{
friend struct IPC::ParamTraits<mozilla::gmp::GMPPlaneImpl>;
public:
GMPPlaneImpl(GMPVideoHostImpl* aHost);
explicit GMPPlaneImpl(GMPVideoHostImpl* aHost);
GMPPlaneImpl(const GMPPlaneData& aPlaneData, GMPVideoHostImpl* aHost);
virtual ~GMPPlaneImpl();

Просмотреть файл

@ -20,7 +20,7 @@ class GMPVideoi420FrameImpl : public GMPVideoi420Frame
{
friend struct IPC::ParamTraits<mozilla::gmp::GMPVideoi420FrameImpl>;
public:
GMPVideoi420FrameImpl(GMPVideoHostImpl* aHost);
explicit GMPVideoi420FrameImpl(GMPVideoHostImpl* aHost);
GMPVideoi420FrameImpl(const GMPVideoi420FrameData& aFrameData, GMPVideoHostImpl* aHost);
virtual ~GMPVideoi420FrameImpl();

Просмотреть файл

@ -31,7 +31,7 @@ class MediaSource;
class MediaSourceDecoder : public MediaDecoder
{
public:
MediaSourceDecoder(dom::HTMLMediaElement* aElement);
explicit MediaSourceDecoder(dom::HTMLMediaElement* aElement);
virtual MediaDecoder* Clone() MOZ_OVERRIDE;
virtual MediaDecoderStateMachine* CreateStateMachine() MOZ_OVERRIDE;

Просмотреть файл

@ -255,7 +255,7 @@ MediaSourceReader::SwitchReaders(SwitchType aType)
class ReleaseDecodersTask : public nsRunnable {
public:
ReleaseDecodersTask(nsTArray<nsRefPtr<SourceBufferDecoder>>& aDecoders)
explicit ReleaseDecodersTask(nsTArray<nsRefPtr<SourceBufferDecoder>>& aDecoders)
{
mDecoders.SwapElements(aDecoders);
}
@ -375,7 +375,7 @@ MediaSourceReader::CreateSubDecoder(const nsACString& aType)
namespace {
class ChangeToHaveMetadata : public nsRunnable {
public:
ChangeToHaveMetadata(AbstractMediaDecoder* aDecoder) :
explicit ChangeToHaveMetadata(AbstractMediaDecoder* aDecoder) :
mDecoder(aDecoder)
{
}

Просмотреть файл

@ -29,7 +29,7 @@ class MediaSource;
class MediaSourceReader : public MediaDecoderReader
{
public:
MediaSourceReader(MediaSourceDecoder* aDecoder);
explicit MediaSourceReader(MediaSourceDecoder* aDecoder);
nsresult Init(MediaDecoderReader* aCloneDonor) MOZ_OVERRIDE
{

Просмотреть файл

@ -46,7 +46,7 @@ class SourceBuffer;
class SourceBufferResource MOZ_FINAL : public MediaResource
{
public:
SourceBufferResource(const nsACString& aType);
explicit SourceBufferResource(const nsACString& aType);
virtual nsresult Close() MOZ_OVERRIDE;
virtual void Suspend(bool aCloseImmediately) MOZ_OVERRIDE { UNIMPLEMENTED(); }
virtual void Resume() MOZ_OVERRIDE { UNIMPLEMENTED(); }

Просмотреть файл

@ -213,7 +213,7 @@ protected:
class VorbisState : public OggCodecState {
public:
VorbisState(ogg_page* aBosPage);
explicit VorbisState(ogg_page* aBosPage);
virtual ~VorbisState();
CodecType GetType() { return TYPE_VORBIS; }
@ -286,7 +286,7 @@ int TheoraVersion(th_info* info,
class TheoraState : public OggCodecState {
public:
TheoraState(ogg_page* aBosPage);
explicit TheoraState(ogg_page* aBosPage);
virtual ~TheoraState();
CodecType GetType() { return TYPE_THEORA; }
@ -325,7 +325,7 @@ private:
class OpusState : public OggCodecState {
#ifdef MOZ_OPUS
public:
OpusState(ogg_page* aBosPage);
explicit OpusState(ogg_page* aBosPage);
virtual ~OpusState();
CodecType GetType() { return TYPE_OPUS; }
@ -384,7 +384,7 @@ private:
class SkeletonState : public OggCodecState {
public:
SkeletonState(ogg_page* aBosPage);
explicit SkeletonState(ogg_page* aBosPage);
~SkeletonState();
CodecType GetType() { return TYPE_SKELETON; }
bool DecodeHeader(ogg_packet* aPacket);

Просмотреть файл

@ -48,7 +48,7 @@ class OggCodecStore
class OggReader MOZ_FINAL : public MediaDecoderReader
{
public:
OggReader(AbstractMediaDecoder* aDecoder);
explicit OggReader(AbstractMediaDecoder* aDecoder);
protected:
~OggReader();

Просмотреть файл

@ -14,7 +14,7 @@ namespace mozilla {
class RawReader : public MediaDecoderReader
{
public:
RawReader(AbstractMediaDecoder* aDecoder);
explicit RawReader(AbstractMediaDecoder* aDecoder);
protected:
~RawReader();

Просмотреть файл

@ -76,7 +76,7 @@ class LoadManager MOZ_FINAL : public webrtc::CPULoadStateCallbackInvoker,
public webrtc::CpuOveruseObserver
{
public:
LoadManager(LoadManagerSingleton* aManager)
explicit LoadManager(LoadManagerSingleton* aManager)
: mManager(aManager)
{}
~LoadManager() {}

Просмотреть файл

@ -101,7 +101,7 @@ LoadMonitor::Observe(nsISupports* /* aSubject */,
class LoadMonitorAddObserver : public nsRunnable
{
public:
LoadMonitorAddObserver(nsRefPtr<LoadMonitor> loadMonitor)
explicit LoadMonitorAddObserver(nsRefPtr<LoadMonitor> loadMonitor)
{
mLoadMonitor = loadMonitor;
}
@ -126,7 +126,7 @@ private:
class LoadMonitorRemoveObserver : public nsRunnable
{
public:
LoadMonitorRemoveObserver(nsRefPtr<LoadMonitor> loadMonitor)
explicit LoadMonitorRemoveObserver(nsRefPtr<LoadMonitor> loadMonitor)
{
mLoadMonitor = loadMonitor;
}

Просмотреть файл

@ -31,7 +31,7 @@ public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIOBSERVER
LoadMonitor(int aLoadUpdateInterval);
explicit LoadMonitor(int aLoadUpdateInterval);
nsresult Init(nsRefPtr<LoadMonitor> &self);
void SetLoadChangeCallback(LoadNotificationCallback* aCallback);

Просмотреть файл

@ -20,7 +20,7 @@ namespace mozilla {
class WaveReader : public MediaDecoderReader
{
public:
WaveReader(AbstractMediaDecoder* aDecoder);
explicit WaveReader(AbstractMediaDecoder* aDecoder);
protected:
~WaveReader();

Просмотреть файл

@ -32,7 +32,7 @@ public:
/**
* Construct with null data.
*/
ThreadSharedFloatArrayBufferList(uint32_t aCount)
explicit ThreadSharedFloatArrayBufferList(uint32_t aCount)
{
mContents.SetLength(aCount);
}

Просмотреть файл

@ -36,7 +36,7 @@ namespace WebCore {
class DirectConvolver {
public:
DirectConvolver(size_t inputBlockSize);
explicit DirectConvolver(size_t inputBlockSize);
void process(const nsTArray<float>* convolutionKernel, const float* sourceP, float* destP, size_t framesToProcess);

Просмотреть файл

@ -41,7 +41,7 @@ using mozilla::FFTBlock;
class FFTConvolver {
public:
// fftSize must be a power of two
FFTConvolver(size_t fftSize);
explicit FFTConvolver(size_t fftSize);
// |fftKernel| must be pre-scaled for FFTBlock::GetInverseWithoutScaling().
//

Просмотреть файл

@ -112,7 +112,7 @@ private:
// Map from sample-rate to loader.
class LoaderByRateEntry : public nsFloatHashKey {
public:
LoaderByRateEntry(KeyTypePointer aKey)
explicit LoaderByRateEntry(KeyTypePointer aKey)
: nsFloatHashKey(aKey)
, mLoader() // so PutEntry() will zero-initialize
{

Просмотреть файл

@ -41,7 +41,7 @@ typedef nsTArray<float> AudioFloatArray;
// just read from the buffer, so it will be ready for accumulation the next time around.
class ReverbAccumulationBuffer {
public:
ReverbAccumulationBuffer(size_t length);
explicit ReverbAccumulationBuffer(size_t length);
// This will read from, then clear-out numberOfFrames
void readAndClear(float* destination, size_t numberOfFrames);

Просмотреть файл

@ -37,7 +37,7 @@ namespace WebCore {
// ReverbInputBuffer is used to buffer input samples for deferred processing by the background threads.
class ReverbInputBuffer {
public:
ReverbInputBuffer(size_t length);
explicit ReverbInputBuffer(size_t length);
// The realtime audio thread keeps writing samples here.
// The assumption is that the buffer's length is evenly divisible by numberOfFrames (for nearly all cases this will be fine).

Просмотреть файл

@ -104,7 +104,7 @@ class WebMPacketQueue : private nsDeque {
class WebMReader : public MediaDecoderReader
{
public:
WebMReader(AbstractMediaDecoder* aDecoder);
explicit WebMReader(AbstractMediaDecoder* aDecoder);
protected:
~WebMReader();

Просмотреть файл

@ -46,7 +46,7 @@ class WebMWriter : public ContainerWriter
public:
// aTrackTypes indicate this muxer should multiplex into Video only or A/V foramt.
// Run in MediaRecorder thread
WebMWriter(uint32_t aTrackTypes);
explicit WebMWriter(uint32_t aTrackTypes);
virtual ~WebMWriter();
// WriteEncodedTrack inserts raw packets into WebM stream.

Просмотреть файл

@ -306,7 +306,7 @@ public:
static const int millisecondsPerSecond = 1000;
static const int frequency = 1000;
SineWaveGenerator(int aSampleRate) :
explicit SineWaveGenerator(int aSampleRate) :
mTotalLength(aSampleRate / frequency),
mReadLength(0) {
MOZ_ASSERT(mTotalLength * frequency == aSampleRate);

Просмотреть файл

@ -38,21 +38,21 @@ class MediaEngineTabVideoSource : public MediaEngineVideoSource, nsIDOMEventList
class StartRunnable : public nsRunnable {
public:
StartRunnable(MediaEngineTabVideoSource *videoSource) : mVideoSource(videoSource) {}
explicit StartRunnable(MediaEngineTabVideoSource *videoSource) : mVideoSource(videoSource) {}
NS_IMETHOD Run();
nsRefPtr<MediaEngineTabVideoSource> mVideoSource;
};
class StopRunnable : public nsRunnable {
public:
StopRunnable(MediaEngineTabVideoSource *videoSource) : mVideoSource(videoSource) {}
explicit StopRunnable(MediaEngineTabVideoSource *videoSource) : mVideoSource(videoSource) {}
NS_IMETHOD Run();
nsRefPtr<MediaEngineTabVideoSource> mVideoSource;
};
class InitRunnable : public nsRunnable {
public:
InitRunnable(MediaEngineTabVideoSource *videoSource) : mVideoSource(videoSource) {}
explicit InitRunnable(MediaEngineTabVideoSource *videoSource) : mVideoSource(videoSource) {}
NS_IMETHOD Run();
nsRefPtr<MediaEngineTabVideoSource> mVideoSource;
};

Просмотреть файл

@ -390,7 +390,7 @@ private:
class MediaEngineWebRTC : public MediaEngine
{
public:
MediaEngineWebRTC(MediaEnginePrefs &aPrefs);
explicit MediaEngineWebRTC(MediaEnginePrefs &aPrefs);
// Clients should ensure to clean-up sources video/audio sources
// before invoking Shutdown on this class.

Просмотреть файл

@ -7,6 +7,7 @@
#ifndef MEDIATRACKCONSTRAINTS_H_
#define MEDIATRACKCONSTRAINTS_H_
#include "mozilla/Attributes.h"
#include "mozilla/dom/MediaStreamTrackBinding.h"
namespace mozilla {
@ -82,7 +83,7 @@ private:
struct AudioTrackConstraintsN :
public MediaTrackConstraintsN<dom::SupportedAudioConstraints>
{
AudioTrackConstraintsN(const dom::MediaTrackConstraints &aOther)
MOZ_IMPLICIT AudioTrackConstraintsN(const dom::MediaTrackConstraints &aOther)
: MediaTrackConstraintsN<dom::SupportedAudioConstraints>(aOther, // B2G ICS compiler bug
dom::SupportedAudioConstraintsValues::strings) {}
};
@ -90,7 +91,7 @@ struct AudioTrackConstraintsN :
struct VideoTrackConstraintsN :
public MediaTrackConstraintsN<dom::SupportedVideoConstraints>
{
VideoTrackConstraintsN(const dom::MediaTrackConstraints &aOther)
MOZ_IMPLICIT VideoTrackConstraintsN(const dom::MediaTrackConstraints &aOther)
: MediaTrackConstraintsN<dom::SupportedVideoConstraints>(aOther,
dom::SupportedVideoConstraintsValues::strings) {
if (mFacingMode.WasPassed()) {

Просмотреть файл

@ -30,7 +30,7 @@ namespace mozilla {
class PeerIdentity MOZ_FINAL
{
public:
PeerIdentity(const nsAString& aPeerIdentity)
explicit PeerIdentity(const nsAString& aPeerIdentity)
: mPeerIdentity(aPeerIdentity) {}
~PeerIdentity() {}

Просмотреть файл

@ -25,7 +25,7 @@ class SpeechGrammar MOZ_FINAL : public nsISupports,
public nsWrapperCache
{
public:
SpeechGrammar(nsISupports* aParent);
explicit SpeechGrammar(nsISupports* aParent);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechGrammar)

Просмотреть файл

@ -28,7 +28,7 @@ class SpeechGrammarList MOZ_FINAL : public nsISupports,
public nsWrapperCache
{
public:
SpeechGrammarList(nsISupports* aParent);
explicit SpeechGrammarList(nsISupports* aParent);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechGrammarList)

Просмотреть файл

@ -59,7 +59,7 @@ class SpeechRecognition MOZ_FINAL : public DOMEventTargetHelper,
{
public:
MOZ_DECLARE_REFCOUNTED_TYPENAME(SpeechRecognition)
SpeechRecognition(nsPIDOMWindow* aOwnerWindow);
explicit SpeechRecognition(nsPIDOMWindow* aOwnerWindow);
NS_DECL_ISUPPORTS_INHERITED
@ -182,7 +182,7 @@ private:
NS_DECL_ISUPPORTS
NS_DECL_NSIDOMGETUSERMEDIASUCCESSCALLBACK
GetUserMediaSuccessCallback(SpeechRecognition* aRecognition)
explicit GetUserMediaSuccessCallback(SpeechRecognition* aRecognition)
: mRecognition(aRecognition)
{}
@ -198,7 +198,7 @@ private:
NS_DECL_ISUPPORTS
NS_DECL_NSIDOMGETUSERMEDIAERRORCALLBACK
GetUserMediaErrorCallback(SpeechRecognition* aRecognition)
explicit GetUserMediaErrorCallback(SpeechRecognition* aRecognition)
: mRecognition(aRecognition)
{}

Просмотреть файл

@ -24,7 +24,7 @@ class SpeechRecognitionAlternative MOZ_FINAL : public nsISupports,
public nsWrapperCache
{
public:
SpeechRecognitionAlternative(SpeechRecognition* aParent);
explicit SpeechRecognitionAlternative(SpeechRecognition* aParent);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechRecognitionAlternative)

Просмотреть файл

@ -25,7 +25,7 @@ class SpeechRecognitionResult MOZ_FINAL : public nsISupports,
public nsWrapperCache
{
public:
SpeechRecognitionResult(SpeechRecognition* aParent);
explicit SpeechRecognitionResult(SpeechRecognition* aParent);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechRecognitionResult)

Просмотреть файл

@ -26,7 +26,7 @@ class SpeechRecognitionResultList MOZ_FINAL : public nsISupports,
public nsWrapperCache
{
public:
SpeechRecognitionResultList(SpeechRecognition* aParent);
explicit SpeechRecognitionResultList(SpeechRecognition* aParent);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechRecognitionResultList)

Просмотреть файл

@ -21,7 +21,7 @@ class SpeechRecognition;
class SpeechStreamListener : public MediaStreamListener
{
public:
SpeechStreamListener(SpeechRecognition* aRecognition);
explicit SpeechStreamListener(SpeechRecognition* aRecognition);
~SpeechStreamListener();
void NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID,

Просмотреть файл

@ -27,7 +27,7 @@ class SpeechSynthesis MOZ_FINAL : public nsISupports,
public nsWrapperCache
{
public:
SpeechSynthesis(nsPIDOMWindow* aParent);
explicit SpeechSynthesis(nsPIDOMWindow* aParent);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechSynthesis)

Просмотреть файл

@ -44,7 +44,7 @@ protected:
class SpeechSynthesisRequestChild : public PSpeechSynthesisRequestChild
{
public:
SpeechSynthesisRequestChild(SpeechTaskChild* aTask);
explicit SpeechSynthesisRequestChild(SpeechTaskChild* aTask);
virtual ~SpeechSynthesisRequestChild();
protected:
@ -72,7 +72,7 @@ class SpeechTaskChild : public nsSpeechTask
friend class SpeechSynthesisRequestChild;
public:
SpeechTaskChild(SpeechSynthesisUtterance* aUtterance);
explicit SpeechTaskChild(SpeechSynthesisUtterance* aUtterance);
NS_IMETHOD Setup(nsISpeechTaskCallback* aCallback,
uint32_t aChannels, uint32_t aRate, uint8_t argc) MOZ_OVERRIDE;

Просмотреть файл

@ -52,7 +52,7 @@ protected:
class SpeechSynthesisRequestParent : public PSpeechSynthesisRequestParent
{
public:
SpeechSynthesisRequestParent(SpeechTaskParent* aTask);
explicit SpeechSynthesisRequestParent(SpeechTaskParent* aTask);
virtual ~SpeechSynthesisRequestParent();
nsRefPtr<SpeechTaskParent> mTask;

Просмотреть файл

@ -28,7 +28,7 @@ namespace dom {
class SynthStreamListener : public MediaStreamListener
{
public:
SynthStreamListener(nsSpeechTask* aSpeechTask) :
explicit SynthStreamListener(nsSpeechTask* aSpeechTask) :
mSpeechTask(aSpeechTask),
mStarted(false)
{

Просмотреть файл

@ -28,7 +28,7 @@ public:
NS_DECL_NSISPEECHTASK
nsSpeechTask(SpeechSynthesisUtterance* aUtterance);
explicit nsSpeechTask(SpeechSynthesisUtterance* aUtterance);
nsSpeechTask(float aVolume, const nsAString& aText);
virtual void Pause();

Просмотреть файл

@ -510,7 +510,7 @@ public:
protected:
virtual ~MediaDevice() {}
MediaDevice(MediaEngineSource* aSource);
explicit MediaDevice(MediaEngineSource* aSource);
nsString mName;
nsString mID;
bool mHasFacingMode;
@ -522,7 +522,7 @@ protected:
class VideoDevice : public MediaDevice
{
public:
VideoDevice(MediaEngineVideoSource* aSource);
explicit VideoDevice(MediaEngineVideoSource* aSource);
NS_IMETHOD GetType(nsAString& aType);
MediaEngineVideoSource* GetSource();
};
@ -530,7 +530,7 @@ public:
class AudioDevice : public MediaDevice
{
public:
AudioDevice(MediaEngineAudioSource* aSource);
explicit AudioDevice(MediaEngineAudioSource* aSource);
NS_IMETHOD GetType(nsAString& aType);
MediaEngineAudioSource* GetSource();
};

Просмотреть файл

@ -117,7 +117,7 @@ class FakeEncoderTask : public GMPTask {
class FakeVideoEncoder : public GMPVideoEncoder {
public:
FakeVideoEncoder (GMPVideoHost* hostAPI) :
explicit FakeVideoEncoder (GMPVideoHost* hostAPI) :
host_ (hostAPI),
callback_ (NULL) {}
@ -271,7 +271,7 @@ class FakeDecoderTask : public GMPTask {
class FakeVideoDecoder : public GMPVideoDecoder {
public:
FakeVideoDecoder (GMPVideoHost* hostAPI) :
explicit FakeVideoDecoder (GMPVideoHost* hostAPI) :
host_ (hostAPI),
callback_ (NULL) {}

Просмотреть файл

@ -24,7 +24,7 @@ public:
, mDuration(0)
{
}
Tkhd(Box& aBox);
explicit Tkhd(Box& aBox);
uint64_t mCreationTime;
uint64_t mModificationTime;
@ -42,7 +42,7 @@ public:
, mDuration(0)
{
}
Mdhd(Box& aBox);
explicit Mdhd(Box& aBox);
Microseconds ToMicroseconds(uint64_t aTimescaleUnits)
{
@ -58,7 +58,7 @@ public:
class Trex
{
public:
Trex(uint32_t aTrackId)
explicit Trex(uint32_t aTrackId)
: mFlags(0)
, mTrackId(aTrackId)
, mDefaultSampleDescriptionIndex(0)
@ -68,7 +68,7 @@ public:
{
}
Trex(Box& aBox);
explicit Trex(Box& aBox);
uint32_t mFlags;
uint32_t mTrackId;
@ -81,7 +81,7 @@ public:
class Tfhd : public Trex
{
public:
Tfhd(Trex& aTrex) : Trex(aTrex), mBaseDataOffset(0) {}
explicit Tfhd(Trex& aTrex) : Trex(aTrex), mBaseDataOffset(0) {}
Tfhd(Box& aBox, Trex& aTrex);
uint64_t mBaseDataOffset;
@ -91,7 +91,7 @@ class Tfdt
{
public:
Tfdt() : mBaseMediaDecodeTime(0) {}
Tfdt(Box& aBox);
explicit Tfdt(Box& aBox);
uint64_t mBaseMediaDecodeTime;
};

Просмотреть файл

@ -37,7 +37,7 @@ enum TrackType { kVideo = 1, kAudio };
class MP4Demuxer
{
public:
MP4Demuxer(Stream* aSource);
explicit MP4Demuxer(Stream* aSource);
~MP4Demuxer();
bool Init();

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше