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

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: Made AudioNode an EventTarget Created 7 years, 8 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/ScriptProcessorNode.h
diff --git a/Source/modules/webaudio/ScriptProcessorNode.h b/Source/modules/webaudio/ScriptProcessorNode.h
index 02eb32737277a13be63ca167837aab10483955c9..444dbc81c5af931de5b3988faf7dc3a50dc7c82f 100644
--- a/Source/modules/webaudio/ScriptProcessorNode.h
+++ b/Source/modules/webaudio/ScriptProcessorNode.h
@@ -25,11 +25,8 @@
#ifndef ScriptProcessorNode_h
#define ScriptProcessorNode_h
-#include "ActiveDOMObject.h"
#include "AudioBus.h"
#include "AudioNode.h"
-#include "EventListener.h"
-#include "EventTarget.h"
#include <wtf/Forward.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.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;
Chris Rogers 2013/04/16 21:03:03 Don't we need these in AudioNode.h now?
russell.mcclellan 2013/04/17 01:59:45 No, we don't need these because they are defined i
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;

Powered by Google App Engine
This is Rietveld 408576698