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

Side by Side Diff: Source/core/html/track/TrackBase.h

Issue 18778002: Inherit EventTarget interface instead of duplicating its code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 15 matching lines...) Expand all
26 #ifndef TrackBase_h 26 #ifndef TrackBase_h
27 #define TrackBase_h 27 #define TrackBase_h
28 28
29 #include "core/dom/EventTarget.h" 29 #include "core/dom/EventTarget.h"
30 #include <wtf/RefCounted.h> 30 #include <wtf/RefCounted.h>
31 31
32 namespace WebCore { 32 namespace WebCore {
33 33
34 class ScriptExecutionContext; 34 class ScriptExecutionContext;
35 35
36 class TrackBase : public RefCounted<TrackBase>, public EventTarget { 36 class TrackBase : public EventTarget, public RefCounted<TrackBase> {
37 public: 37 public:
38 virtual ~TrackBase(); 38 virtual ~TrackBase();
39 39
40 enum Type { BaseTrack, TextTrack, AudioTrack, VideoTrack }; 40 enum Type { BaseTrack, TextTrack, AudioTrack, VideoTrack };
41 Type type() const { return m_type; } 41 Type type() const { return m_type; }
42 42
43 virtual const AtomicString& interfaceName() const; 43 virtual const AtomicString& interfaceName() const;
44 virtual ScriptExecutionContext* scriptExecutionContext() const; 44 virtual ScriptExecutionContext* scriptExecutionContext() const;
45 45
46 using RefCounted<TrackBase>::ref; 46 using RefCounted<TrackBase>::ref;
(...skipping 11 matching lines...) Expand all
58 virtual void refEventTarget() { ref(); } 58 virtual void refEventTarget() { ref(); }
59 virtual void derefEventTarget() { deref(); } 59 virtual void derefEventTarget() { deref(); }
60 60
61 ScriptExecutionContext* m_scriptExecutionContext; 61 ScriptExecutionContext* m_scriptExecutionContext;
62 EventTargetData m_eventTargetData; 62 EventTargetData m_eventTargetData;
63 }; 63 };
64 64
65 } // namespace WebCore 65 } // namespace WebCore
66 66
67 #endif // TrackBase_h 67 #endif // TrackBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698