Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: Source/modules/webaudio/AbstractAudioContext.h

Issue 1237383004: Revert of Implement suspend() and resume() for OfflineAudioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | Source/modules/webaudio/AbstractAudioContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AbstractAudioContext.h
diff --git a/Source/modules/webaudio/AbstractAudioContext.h b/Source/modules/webaudio/AbstractAudioContext.h
index ce0fbb09234f8f0c5938fa433ab3b80966eaaf07..5994c223ef747ca2a9a8fd28584233c983c62d91 100644
--- a/Source/modules/webaudio/AbstractAudioContext.h
+++ b/Source/modules/webaudio/AbstractAudioContext.h
@@ -160,13 +160,8 @@
// Close
virtual ScriptPromise closeContext(ScriptState*) = 0;
- // Suspend for online audio context.
+ // Suspend/Resume
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,
@@ -225,13 +220,12 @@
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.
@@ -248,6 +242,8 @@
void setContextState(AudioContextState);
virtual void didClose() {}
void uninitialize();
+
+ RefPtrWillBeMember<ScriptPromiseResolver> m_offlineResolver;
// FIXME(dominicc): Move m_resumeResolvers to AudioContext, because only
// it creates these Promises.
@@ -304,8 +300,6 @@
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.
@@ -318,9 +312,6 @@
// 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 };
« no previous file with comments | « Source/core/frame/UseCounter.h ('k') | Source/modules/webaudio/AbstractAudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698