Chromium Code Reviews| Index: Source/modules/webaudio/AudioContext.h |
| diff --git a/Source/modules/webaudio/AudioContext.h b/Source/modules/webaudio/AudioContext.h |
| index 092eece9ac5f427e7bf33a1913c3ae1f5dd9c4b4..1c26266419e09f8e7c52d84a0f7b675606c52fdb 100644 |
| --- a/Source/modules/webaudio/AudioContext.h |
| +++ b/Source/modules/webaudio/AudioContext.h |
| @@ -219,11 +219,9 @@ public: |
| virtual const AtomicString& interfaceName() const override final; |
| virtual ExecutionContext* executionContext() const override final; |
| - DEFINE_ATTRIBUTE_EVENT_LISTENER(complete); |
| DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| void startRendering(); |
| - void fireCompletionEvent(); |
| void notifyStateChange(); |
| // A context is considered closed if: |
| @@ -238,11 +236,19 @@ public: |
| // Get the security origin for this audio context. |
| SecurityOrigin* securityOrigin() const; |
| + // FIXME: Refactoring needed. These are OfflineAudioContext-specific tasks. |
|
haraken
2015/06/17 06:46:08
FIXME => TODO
hongchan
2015/06/17 20:10:38
Done.
|
| + virtual void fireCompletionEvent(); |
| + virtual bool shouldSuspendNow(); |
| + virtual void resolvePendingSuspendPromises(); |
| + Member<AudioBuffer> renderTarget() const { return m_renderTarget; } |
|
haraken
2015/06/17 06:46:08
Member<AudioBuffer> => AudioBuffer*
m_renderTarge
hongchan
2015/06/17 20:10:38
Done.
|
| + |
| protected: |
| explicit AudioContext(Document*); |
| AudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate); |
| - RefPtrWillBeMember<ScriptPromiseResolver> m_offlineResolver; |
| + // Shared with OfflineAudioContext. |
| + void setContextState(AudioContextState); |
| + |
| private: |
| void initialize(); |
| void uninitialize(); |
| @@ -307,7 +313,6 @@ private: |
| // The state of the AudioContext. |
| AudioContextState m_contextState; |
| - void setContextState(AudioContextState); |
| AsyncAudioDecoder m_audioDecoder; |
| @@ -319,6 +324,9 @@ private: |
| // can, try to stop them so they can be collected. |
| void handleStoppableSourceNodes(); |
| + // Perform common tasks after the render quantum. Called by handlePostRenderTasks(). |
| + void performPostRenderTasks(); |
| + |
| // This is considering 32 is large enough for multiple channels audio. |
| // It is somewhat arbitrary and could be increased if necessary. |
| enum { MaxNumberOfChannels = 32 }; |