Chromium Code Reviews| Index: Source/modules/webaudio/AbstractAudioContext.h |
| diff --git a/Source/modules/webaudio/AbstractAudioContext.h b/Source/modules/webaudio/AbstractAudioContext.h |
| index 5994c223ef747ca2a9a8fd28584233c983c62d91..b4892d4d63409c3be531fec92f0edecf935e563d 100644 |
| --- a/Source/modules/webaudio/AbstractAudioContext.h |
| +++ b/Source/modules/webaudio/AbstractAudioContext.h |
| @@ -160,8 +160,13 @@ public: |
| // Close |
| virtual ScriptPromise closeContext(ScriptState*) = 0; |
| - // Suspend/Resume |
| + // Suspend for online audio context. |
| virtual ScriptPromise suspendContext(ScriptState*) = 0; |
| + |
| + // Suspend for offline audio context. |
| + virtual ScriptPromise suspendContext(ScriptState*, double) = 0; |
| + |
| + // Resume |
| virtual ScriptPromise resumeContext(ScriptState*) = 0; |
| // When a source node has started processing and needs to be protected, |
| @@ -220,13 +225,14 @@ public: |
| const AtomicString& interfaceName() const final; |
| ExecutionContext* executionContext() const final; |
| - DEFINE_ATTRIBUTE_EVENT_LISTENER(complete); |
| DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); |
| void startRendering(); |
| - void fireCompletionEvent(); |
| void notifyStateChange(); |
| + // TODO(hongchan): move this to OfflineAudioContext. |
| + AudioBuffer* renderTarget() const { return m_renderTarget.get(); } |
| + |
| // A context is considered closed if: |
| // - closeContext() has been called. |
| // - it has been stopped by its execution context. |
| @@ -243,7 +249,7 @@ protected: |
| virtual void didClose() {} |
| void uninitialize(); |
| - RefPtrWillBeMember<ScriptPromiseResolver> m_offlineResolver; |
| + // RefPtrWillBeMember<ScriptPromiseResolver> m_offlineResolver; |
|
tkent
2015/07/16 00:33:43
Remove this line.
hongchan
2015/07/16 16:22:18
Done.
|
| // FIXME(dominicc): Move m_resumeResolvers to AudioContext, because only |
| // it creates these Promises. |
| @@ -300,6 +306,8 @@ private: |
| bool m_didInitializeContextGraphMutex; |
| RefPtr<DeferredTaskHandler> m_deferredTaskHandler; |
| + // For offline audio context. |
| + // TODO(hongchan): move this to OfflineAudioContext class. |
| Member<AudioBuffer> m_renderTarget; |
| // The state of the AbstractAudioContext. |