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

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

Issue 1140723003: Implement suspend() and resume() for OfflineAudioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixing nits 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
Index: Source/modules/webaudio/AbstractAudioContext.cpp
diff --git a/Source/modules/webaudio/AbstractAudioContext.cpp b/Source/modules/webaudio/AbstractAudioContext.cpp
index 02c46d9010798b899d662f57418bb3ec9cb0a078..ee0a504e3f392b580963e2360c6989c607d20301 100644
--- a/Source/modules/webaudio/AbstractAudioContext.cpp
+++ b/Source/modules/webaudio/AbstractAudioContext.cpp
@@ -826,33 +826,8 @@ void AbstractAudioContext::startRendering()
}
}
-void AbstractAudioContext::fireCompletionEvent()
-{
- ASSERT(isMainThread());
- if (!isMainThread())
- return;
-
- AudioBuffer* renderedBuffer = m_renderTarget.get();
-
- // For an offline context, we set the state to closed here so that the oncomplete handler sees
- // that the context has been closed.
- setContextState(Closed);
-
- ASSERT(renderedBuffer);
- if (!renderedBuffer)
- return;
-
- // Avoid firing the event if the document has already gone away.
- if (executionContext()) {
- // Call the offline rendering completion event listener and resolve the promise too.
- dispatchEvent(OfflineAudioCompletionEvent::create(renderedBuffer));
- m_offlineResolver->resolve(renderedBuffer);
- }
-}
-
DEFINE_TRACE(AbstractAudioContext)
{
- visitor->trace(m_offlineResolver);
visitor->trace(m_renderTarget);
visitor->trace(m_destinationNode);
visitor->trace(m_listener);

Powered by Google App Engine
This is Rietveld 408576698