Chromium Code Reviews| Index: Source/modules/webaudio/AudioContext.h |
| diff --git a/Source/modules/webaudio/AudioContext.h b/Source/modules/webaudio/AudioContext.h |
| index 5b19a40d2b8248048d972429ba0e5fe3275e7b52..f8753ef417f1587594967940eb5aedc6a6e163d8 100644 |
| --- a/Source/modules/webaudio/AudioContext.h |
| +++ b/Source/modules/webaudio/AudioContext.h |
| @@ -220,9 +220,13 @@ public: |
| DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| void startRendering(); |
| - void fireCompletionEvent(); |
| void notifyStateChange(); |
| + // From offline rendering. |
| + void fireSuspendEvent(); |
| + void fireCompletionEvent(); |
| + virtual bool suspendIfNecessary(); |
| + |
| // A context is considered closed if: |
| // - closeContext() has been called, even if the audio HW has not yet been |
| // stopped. It will be stopped eventually. |
| @@ -240,6 +244,14 @@ protected: |
| AudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate); |
| RefPtrWillBeMember<ScriptPromiseResolver> m_offlineResolver; |
| + Member<AudioDestinationNode> m_destinationNode; |
| + bool m_didInitializeContextGraphMutex; |
| + Member<AudioBuffer> m_renderTarget; |
| + |
| + // The state of the AudioContext. |
| + void setContextState(AudioContextState); |
| + AudioContextState m_contextState; |
| + |
| private: |
| void initialize(); |
| void uninitialize(); |
| @@ -259,7 +271,7 @@ private: |
| // haven't finished playing. Make sure to release them here. |
| void releaseActiveSourceNodes(); |
| - Member<AudioDestinationNode> m_destinationNode; |
|
Raymond Toy
2015/05/13 17:16:08
Try not to move things around. It makes it hard t
hongchan
2015/05/13 17:30:53
Yes, this relocation was not necessary. However, t
|
| + |
| Member<AudioListener> m_listener; |
| // Only accessed in the audio thread. |
| @@ -299,18 +311,10 @@ private: |
| unsigned m_connectionCount; |
| - // Graph locking. |
| - bool m_didInitializeContextGraphMutex; |
| RefPtr<DeferredTaskHandler> m_deferredTaskHandler; |
| - Member<AudioBuffer> m_renderTarget; |
| - |
| bool m_isOfflineContext; |
| - // The state of the AudioContext. |
| - AudioContextState m_contextState; |
| - void setContextState(AudioContextState); |
| - |
| AsyncAudioDecoder m_audioDecoder; |
| // The Promise that is returned by close(); |