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

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

Issue 23710047: Merge 157615 "Keep AudioScheduledSourceNode alive until onended ..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1599/
Patch Set: Created 7 years, 3 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 | « no previous file | Source/modules/webaudio/AudioScheduledSourceNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioScheduledSourceNode.h
===================================================================
--- Source/modules/webaudio/AudioScheduledSourceNode.h (revision 157760)
+++ Source/modules/webaudio/AudioScheduledSourceNode.h (working copy)
@@ -54,6 +54,17 @@
FINISHED_STATE = 3
};
+ // This helper class handles the lifetime of an AudioScheduledSourceNode with an onended event
+ // listener. This keeps the node alive until the event listener is processed.
+ class NotifyEndedTask {
+ public:
+ NotifyEndedTask(PassRefPtr<AudioScheduledSourceNode> scheduledNode);
+ void notifyEnded();
+
+ private:
+ RefPtr<AudioScheduledSourceNode> m_scheduledNode;
+ };
+
AudioScheduledSourceNode(AudioContext*, float sampleRate);
// Scheduling.
@@ -87,7 +98,6 @@
virtual void finish();
static void notifyEndedDispatch(void*);
- void notifyEnded();
PlaybackState m_playbackState;
« no previous file with comments | « no previous file | Source/modules/webaudio/AudioScheduledSourceNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698