Index: third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h |
diff --git a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h |
similarity index 92% |
rename from third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h |
rename to third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h |
index 26f5388bc0935f75db5f7774667bd0f915006931..96eda531fc596001d9d6d1b8a546400f355ff284 100644 |
--- a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.h |
+++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h |
@@ -22,8 +22,8 @@ |
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef AbstractAudioContext_h |
-#define AbstractAudioContext_h |
+#ifndef BaseAudioContext_h |
+#define BaseAudioContext_h |
#include "bindings/core/v8/ActiveScriptWrappable.h" |
#include "bindings/core/v8/ScriptPromise.h" |
@@ -78,12 +78,12 @@ class SecurityOrigin; |
class StereoPannerNode; |
class WaveShaperNode; |
-// AbstractAudioContext is the cornerstone of the web audio API and all AudioNodes are created from it. |
+// BaseAudioContext is the cornerstone of the web audio API and all AudioNodes are created from it. |
// For thread safety between the audio thread and the main thread, it has a rendering graph locking mechanism. |
-class MODULES_EXPORT AbstractAudioContext : public RefCountedGarbageCollectedEventTargetWithInlineData<AbstractAudioContext>, public ActiveScriptWrappable, public ActiveDOMObject { |
- REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(AbstractAudioContext); |
- USING_GARBAGE_COLLECTED_MIXIN(AbstractAudioContext); |
+class MODULES_EXPORT BaseAudioContext : public RefCountedGarbageCollectedEventTargetWithInlineData<BaseAudioContext>, public ActiveScriptWrappable, public ActiveDOMObject { |
+ REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(BaseAudioContext); |
+ USING_GARBAGE_COLLECTED_MIXIN(BaseAudioContext); |
DEFINE_WRAPPERTYPEINFO(); |
public: |
// The state of an audio context. On creation, the state is Suspended. The state is Running if |
@@ -97,9 +97,9 @@ public: |
}; |
// Create an AudioContext for rendering to the audio hardware. |
- static AbstractAudioContext* create(Document&, ExceptionState&); |
+ static BaseAudioContext* create(Document&, ExceptionState&); |
- ~AbstractAudioContext() override; |
+ ~BaseAudioContext() override; |
DECLARE_VIRTUAL_TRACE(); |
@@ -145,9 +145,6 @@ public: |
// The AudioNode create methods are called on the main thread (from JavaScript). |
AudioBufferSourceNode* createBufferSource(ExceptionState&); |
- MediaElementAudioSourceNode* createMediaElementSource(HTMLMediaElement*, ExceptionState&); |
- MediaStreamAudioSourceNode* createMediaStreamSource(MediaStream*, ExceptionState&); |
- MediaStreamAudioDestinationNode* createMediaStreamDestination(ExceptionState&); |
GainNode* createGain(ExceptionState&); |
BiquadFilterNode* createBiquadFilter(ExceptionState&); |
WaveShaperNode* createWaveShaper(ExceptionState&); |
@@ -256,8 +253,8 @@ public: |
// if necessary. |
PeriodicWave* periodicWave(int type); |
protected: |
- explicit AbstractAudioContext(Document*); |
- AbstractAudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate); |
+ explicit BaseAudioContext(Document*); |
+ BaseAudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate); |
void initialize(); |
void uninitialize(); |
@@ -281,12 +278,12 @@ protected: |
void setClosedContextSampleRate(float newSampleRate) { m_closedContextSampleRate = newSampleRate; } |
float closedContextSampleRate() const { return m_closedContextSampleRate; } |
+ void throwExceptionForClosedState(ExceptionState&); |
+ |
private: |
bool m_isCleared; |
void clear(); |
- void throwExceptionForClosedState(ExceptionState&); |
- |
// When the context goes away, there might still be some sources which |
// haven't finished playing. Make sure to release them here. |
void releaseActiveSourceNodes(); |
@@ -325,7 +322,7 @@ private: |
bool m_didInitializeContextGraphMutex; |
RefPtr<DeferredTaskHandler> m_deferredTaskHandler; |
- // The state of the AbstractAudioContext. |
+ // The state of the BaseAudioContext. |
AudioContextState m_contextState; |
AsyncAudioDecoder m_audioDecoder; |
@@ -354,4 +351,4 @@ private: |
} // namespace blink |
-#endif // AbstractAudioContext_h |
+#endif // BaseAudioContext_h |