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

Unified Diff: Source/core/html/track/TextTrackList.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/core/html/track/TextTrackCue.cpp ('k') | Source/core/html/track/TrackBase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/TextTrackList.h
diff --git a/Source/core/html/track/TextTrackList.h b/Source/core/html/track/TextTrackList.h
index 80ae41a5bec09cd1e5f97daf839ee499a78dae81..81ca69b0f11eaef5b8324a06cf1601d5e4533852 100644
--- a/Source/core/html/track/TextTrackList.h
+++ b/Source/core/html/track/TextTrackList.h
@@ -40,7 +40,7 @@ class HTMLMediaElement;
class TextTrack;
class TextTrackList;
-class TextTrackList : public RefCounted<TextTrackList>, public ScriptWrappable, public EventTarget {
+class TextTrackList : public RefCounted<TextTrackList>, public ScriptWrappable, public EventTargetWithInlineData {
public:
static PassRefPtr<TextTrackList> create(HTMLMediaElement* owner, ScriptExecutionContext* context)
{
@@ -58,10 +58,10 @@ public:
void remove(TextTrack*);
// EventTarget
- virtual const AtomicString& interfaceName() const;
+ virtual const AtomicString& interfaceName() const OVERRIDE;
using RefCounted<TextTrackList>::ref;
using RefCounted<TextTrackList>::deref;
- virtual ScriptExecutionContext* scriptExecutionContext() const { return m_context; }
+ virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE { return m_context; }
DEFINE_ATTRIBUTE_EVENT_LISTENER(addtrack);
@@ -74,10 +74,8 @@ private:
TextTrackList(HTMLMediaElement*, ScriptExecutionContext*);
// EventTarget
- virtual void refEventTarget() { ref(); }
- virtual void derefEventTarget() { deref(); }
- virtual EventTargetData* eventTargetData() { return &m_eventTargetData; }
- virtual EventTargetData* ensureEventTargetData() { return &m_eventTargetData; }
+ virtual void refEventTarget() OVERRIDE { ref(); }
+ virtual void derefEventTarget() OVERRIDE { deref(); }
void scheduleAddTrackEvent(PassRefPtr<TextTrack>);
void asyncEventTimerFired(Timer<TextTrackList>*);
@@ -90,7 +88,6 @@ private:
Vector<RefPtr<Event> > m_pendingEvents;
Timer<TextTrackList> m_pendingEventTimer;
- EventTargetData m_eventTargetData;
Vector<RefPtr<TextTrack> > m_addTrackTracks;
Vector<RefPtr<TextTrack> > m_elementTracks;
Vector<RefPtr<TextTrack> > m_inbandTracks;
« no previous file with comments | « Source/core/html/track/TextTrackCue.cpp ('k') | Source/core/html/track/TrackBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698