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

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

Issue 14028011: Made AudioNode an EventTarget (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: upate to latest Created 7 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
« no previous file with comments | « Source/modules/webaudio/AudioNode.idl ('k') | Source/modules/webaudio/ScriptProcessorNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/ScriptProcessorNode.h
diff --git a/Source/modules/webaudio/ScriptProcessorNode.h b/Source/modules/webaudio/ScriptProcessorNode.h
index 65c56cc4417ca0c8f3a486b82a27debf255150c4..7fc4245f7faf3838634f21c22dafe237e5312d09 100644
--- a/Source/modules/webaudio/ScriptProcessorNode.h
+++ b/Source/modules/webaudio/ScriptProcessorNode.h
@@ -25,9 +25,6 @@
#ifndef ScriptProcessorNode_h
#define ScriptProcessorNode_h
-#include "core/dom/ActiveDOMObject.h"
-#include "core/dom/EventListener.h"
-#include "core/dom/EventTarget.h"
#include "core/platform/audio/AudioBus.h"
#include "modules/webaudio/AudioNode.h"
#include "wtf/Forward.h"
@@ -47,8 +44,7 @@ class AudioProcessingEvent;
// The "onaudioprocess" attribute is an event listener which will get called periodically with an AudioProcessingEvent which has
// AudioBuffers for each input and output.
-// FIXME: EventTarget should be introduced at the base of the inheritance hierarchy (i.e., as a base class for AudioNode).
-class ScriptProcessorNode : public AudioNode, public EventTarget {
+class ScriptProcessorNode : public AudioNode {
public:
// bufferSize must be one of the following values: 256, 512, 1024, 2048, 4096, 8192, 16384.
// This value controls how frequently the onaudioprocess event handler is called and how many sample-frames need to be processed each call.
@@ -64,19 +60,10 @@ public:
virtual void initialize();
virtual void uninitialize();
- // EventTarget
- virtual const AtomicString& interfaceName() const;
- virtual ScriptExecutionContext* scriptExecutionContext() const;
- virtual EventTargetData* eventTargetData() { return &m_eventTargetData; }
- virtual EventTargetData* ensureEventTargetData() { return &m_eventTargetData; }
-
size_t bufferSize() const { return m_bufferSize; }
DEFINE_ATTRIBUTE_EVENT_LISTENER(audioprocess);
- // Reconcile ref/deref which are defined both in AudioNode and EventTarget.
- using AudioNode::ref;
- using AudioNode::deref;
private:
virtual double tailTime() const OVERRIDE;
@@ -95,10 +82,6 @@ private:
Vector<RefPtr<AudioBuffer> > m_inputBuffers;
Vector<RefPtr<AudioBuffer> > m_outputBuffers;
- virtual void refEventTarget() { ref(); }
- virtual void derefEventTarget() { deref(); }
- EventTargetData m_eventTargetData;
-
size_t m_bufferSize;
unsigned m_bufferReadWriteIndex;
volatile bool m_isRequestOutstanding;
« no previous file with comments | « Source/modules/webaudio/AudioNode.idl ('k') | Source/modules/webaudio/ScriptProcessorNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698