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

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

Issue 26878003: Reduce repetitive EventTarget subclassing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nit Created 7 years, 2 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/speech/SpeechSynthesisUtterance.h ('k') | Source/modules/webaudio/AudioNode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioContext.h
diff --git a/Source/modules/webaudio/AudioContext.h b/Source/modules/webaudio/AudioContext.h
index 6909821134848d8dc6e3d63c7d211952d19dd823..e15ac3958104cffb5c83cab55e6a2f1ec0902fbd 100644
--- a/Source/modules/webaudio/AudioContext.h
+++ b/Source/modules/webaudio/AudioContext.h
@@ -74,7 +74,7 @@ class WaveShaperNode;
// AudioContext is the cornerstone of the web audio API and all AudioNodes are created from it.
// For thread safety between the audio thread and the main thread, it has a rendering graph locking mechanism.
-class AudioContext : public ActiveDOMObject, public ScriptWrappable, public ThreadSafeRefCounted<AudioContext>, public EventTarget {
+class AudioContext : public ActiveDOMObject, public ScriptWrappable, public ThreadSafeRefCounted<AudioContext>, public EventTargetWithInlineData {
public:
// Create an AudioContext for rendering to the audio hardware.
static PassRefPtr<AudioContext> create(Document*);
@@ -233,10 +233,8 @@ public:
void removeMarkedSummingJunction(AudioSummingJunction*);
// EventTarget
- virtual const AtomicString& interfaceName() const;
- virtual ScriptExecutionContext* scriptExecutionContext() const;
- virtual EventTargetData* eventTargetData() { return &m_eventTargetData; }
- virtual EventTargetData* ensureEventTargetData() { return &m_eventTargetData; }
+ virtual const AtomicString& interfaceName() const OVERRIDE;
+ virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
DEFINE_ATTRIBUTE_EVENT_LISTENER(complete);
@@ -333,9 +331,8 @@ private:
RefPtr<HRTFDatabaseLoader> m_hrtfDatabaseLoader;
// EventTarget
- virtual void refEventTarget() { ref(); }
- virtual void derefEventTarget() { deref(); }
- EventTargetData m_eventTargetData;
+ virtual void refEventTarget() OVERRIDE { ref(); }
+ virtual void derefEventTarget() OVERRIDE { deref(); }
RefPtr<AudioBuffer> m_renderTarget;
« no previous file with comments | « Source/modules/speech/SpeechSynthesisUtterance.h ('k') | Source/modules/webaudio/AudioNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698