bug 1208327 make enum AudioContextOperation strongly typed and forward declare instead of including AudioContext.h r=roc

AudioContext.h is now exported only under mozilla.dom.

--HG--
extra : rebase_source : 7fc0a25a6bb8efe497a0e779dca2df5d7e3397b1
This commit is contained in:
Karl Tomlinson 2015-09-25 08:49:03 +12:00
Родитель 7459312fc7
Коммит e8c9471dea
5 изменённых файлов: 14 добавлений и 7 удалений

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

@ -13,7 +13,6 @@
#include "AudioSegment.h"
#include "SelfRef.h"
#include "mozilla/Atomics.h"
#include "AudioContext.h"
struct cubeb_stream;

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

@ -2911,9 +2911,15 @@ MediaStreamGraphImpl::AudioContextOperationCompleted(MediaStream* aStream,
AudioContextState state;
switch (aOperation) {
case Suspend: state = AudioContextState::Suspended; break;
case Resume: state = AudioContextState::Running; break;
case Close: state = AudioContextState::Closed; break;
case AudioContextOperation::Suspend:
state = AudioContextState::Suspended;
break;
case AudioContextOperation::Resume:
state = AudioContextState::Running;
break;
case AudioContextOperation::Close:
state = AudioContextState::Closed;
break;
default: MOZ_CRASH("Not handled.");
}

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

@ -23,7 +23,6 @@
#include "nsAutoRef.h"
#include <speex/speex_resampler.h>
#include "DOMMediaStream.h"
#include "AudioContext.h"
class nsIRunnable;
@ -38,6 +37,10 @@ namespace mozilla {
extern PRLogModuleInfo* gMediaStreamGraphLog;
namespace dom {
enum class AudioContextOperation;
}
/*
* MediaStreamGraph is a framework for synchronized audio/video processing
* and playback. It is designed to be used by other browser components such as

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

@ -111,7 +111,7 @@ private:
AudioContextState mNewState;
};
enum AudioContextOperation { Suspend, Resume, Close };
enum class AudioContextOperation { Suspend, Resume, Close };
class AudioContext final : public DOMEventTargetHelper,
public nsIMemoryReporter

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

@ -21,7 +21,6 @@ MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
EXPORTS += [
'AlignedTArray.h',
'AudioBlock.h',
'AudioContext.h',
'AudioEventTimeline.h',
'AudioNodeEngine.h',
'AudioNodeExternalInputStream.h',