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

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

Issue 23596014: Keep AudioScheduledSourceNode alive until onended is called. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Implement ActiveDOMObject::stop() 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
Index: Source/modules/webaudio/AudioScheduledSourceNode.h
diff --git a/Source/modules/webaudio/AudioScheduledSourceNode.h b/Source/modules/webaudio/AudioScheduledSourceNode.h
index 552fa0e75180ea09a107136d7e38de2fff382a3f..296c6abf971b4bc421aeb1b3ba947aad6697ddc5 100644
--- a/Source/modules/webaudio/AudioScheduledSourceNode.h
+++ b/Source/modules/webaudio/AudioScheduledSourceNode.h
@@ -29,13 +29,14 @@
#ifndef AudioScheduledSourceNode_h
#define AudioScheduledSourceNode_h
+#include "core/dom/ActiveDOMObject.h"
#include "modules/webaudio/AudioSourceNode.h"
namespace WebCore {
class AudioBus;
-class AudioScheduledSourceNode : public AudioSourceNode {
+class AudioScheduledSourceNode : public AudioSourceNode, public ActiveDOMObject {
public:
// These are the possible states an AudioScheduledSourceNode can be in:
//
@@ -58,7 +59,7 @@ public:
// Scheduling.
void start(double when);
- void stop(double when);
+ void stopNote(double when);
void noteOn(double when);
void noteOff(double when);
@@ -70,6 +71,9 @@ public:
EventListener* onended(DOMWrapperWorld* isolatedWorld) { return getAttributeEventListener(eventNames().endedEvent, isolatedWorld); }
void setOnended(PassRefPtr<EventListener>, DOMWrapperWorld* isolatedWorld = 0);
+ virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
+ virtual void stop() OVERRIDE;
+
protected:
// Get frame information for the current time quantum.
// We handle the transition into PLAYING_STATE and FINISHED_STATE here,
@@ -100,6 +104,7 @@ protected:
double m_endTime; // in seconds
bool m_hasEndedListener;
+ bool m_notifyingEndedListener;
static const double UnknownTime;
};

Powered by Google App Engine
This is Rietveld 408576698