Index: Source/modules/webaudio/AudioContext.h |
diff --git a/Source/modules/webaudio/AudioContext.h b/Source/modules/webaudio/AudioContext.h |
index 092eece9ac5f427e7bf33a1913c3ae1f5dd9c4b4..dba8f3a032c0c70f05d0960d0c2c48f1d85c3f41 100644 |
--- a/Source/modules/webaudio/AudioContext.h |
+++ b/Source/modules/webaudio/AudioContext.h |
@@ -219,13 +219,16 @@ 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(); |
+ virtual void fireCompletionEvent(); |
void notifyStateChange(); |
+ // For OfflineAudioContext-specific tasks. |
+ virtual bool shouldSuspendNow(); |
+ virtual void resolvePendingSuspendPromises(); |
+ |
// A context is considered closed if: |
// - closeContext() has been called, even if the audio HW has not yet been |
// stopped. It will be stopped eventually. |
@@ -238,11 +241,16 @@ public: |
// Get the security origin for this audio context. |
SecurityOrigin* securityOrigin() const; |
+ Member<AudioBuffer> renderTarget() const { return m_renderTarget; } |
+ AudioDestinationNode* destination() const { return m_destinationNode; } |
+ |
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 +315,6 @@ private: |
// The state of the AudioContext. |
AudioContextState m_contextState; |
- void setContextState(AudioContextState); |
AsyncAudioDecoder m_audioDecoder; |