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

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

Issue 1140723003: Implement suspend() and resume() for OfflineAudioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Initial Design Created 5 years, 7 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/OfflineAudioContext.h
diff --git a/Source/modules/webaudio/OfflineAudioContext.h b/Source/modules/webaudio/OfflineAudioContext.h
index 99276e7cbb5e19dc7edf2934b67a726f2eed8d2a..2b613f83e1b7c17ddee61e019cb920a6c6000f30 100644
--- a/Source/modules/webaudio/OfflineAudioContext.h
+++ b/Source/modules/webaudio/OfflineAudioContext.h
@@ -36,12 +36,23 @@ class MODULES_EXPORT OfflineAudioContext final : public AudioContext {
DEFINE_WRAPPERTYPEINFO();
public:
static OfflineAudioContext* create(ExecutionContext*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate, ExceptionState&);
-
virtual ~OfflineAudioContext();
+ virtual bool suspendIfNecessary();
+
+ // IDL implementations.
ScriptPromise startOfflineRendering(ScriptState*);
+ ScriptPromise suspendOfflineRendering(ScriptState*, double suspendTime);
+ ScriptPromise resumeOfflineRendering(ScriptState*);
+
private:
OfflineAudioContext(Document*, unsigned numberOfChannels, size_t numberOfFrames, float sampleRate);
+
+ WillBeHeapVector<RefPtrWillBeMember<ScriptPromiseResolver>> m_offlineSuspendResolvers;
+ WillBeHeapVector<RefPtrWillBeMember<ScriptPromiseResolver>> m_offlineResumeResolvers;
Raymond Toy 2015/05/13 17:16:08 As discussed earlier, the online context is going
hongchan 2015/05/13 17:30:53 Yes. That makes sense. These are actually not used
+
+ bool m_isSuspendScheduled;
+ double m_suspendTime;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698