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

Unified Diff: Source/core/html/track/TrackBase.h

Issue 92783002: Move code that applies to audio and video tracks into TrackBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@tmp
Patch Set: Rebased again Created 6 years, 11 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/TextTrackList.cpp ('k') | Source/core/html/track/TrackBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/TrackBase.h
diff --git a/Source/core/html/track/TrackBase.h b/Source/core/html/track/TrackBase.h
index 38ead6489f06ed437ee6bd750dffa58f5be083d1..b291c68db363fd0a7b2e59c5c97e2c86a39aa651 100644
--- a/Source/core/html/track/TrackBase.h
+++ b/Source/core/html/track/TrackBase.h
@@ -26,24 +26,42 @@
#ifndef TrackBase_h
#define TrackBase_h
-#include "core/events/EventTarget.h"
#include "wtf/RefCounted.h"
+#include "wtf/text/AtomicString.h"
namespace WebCore {
-class TrackBase : public RefCounted<TrackBase>, public EventTargetWithInlineData {
- REFCOUNTED_EVENT_TARGET(TrackBase);
+class TrackBase : public RefCounted<TrackBase> {
public:
- virtual ~TrackBase() { }
+ virtual ~TrackBase();
enum Type { TextTrack, AudioTrack, VideoTrack };
Type type() const { return m_type; }
+ const AtomicString& kind() const { return m_kind; }
+ virtual void setKind(const AtomicString&);
+
+ AtomicString label() const { return m_label; }
+ void setLabel(const AtomicString& label) { m_label = label; }
+
+ AtomicString language() const { return m_language; }
+ void setLanguage(const AtomicString& language) { m_language = language; }
+
+ AtomicString id() const { return m_id; }
+ void setId(const AtomicString& id) { m_id = id; }
+
protected:
- explicit TrackBase(Type type) : m_type(type) { }
+ TrackBase(Type, const AtomicString& label, const AtomicString& language, const AtomicString& id);
+
+ virtual bool isValidKind(const AtomicString&) const = 0;
+ virtual AtomicString defaultKind() const = 0;
private:
Type m_type;
+ AtomicString m_kind;
+ AtomicString m_label;
+ AtomicString m_language;
+ AtomicString m_id;
};
} // namespace WebCore
« no previous file with comments | « Source/core/html/track/TextTrackList.cpp ('k') | Source/core/html/track/TrackBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698