Index: Source/core/html/track/TrackBase.h |
diff --git a/Source/core/html/track/TrackBase.h b/Source/core/html/track/TrackBase.h |
index d3625f076e5d349e4e089b20a86f5ba9e4c8b9c5..cff2b8a65629d2fda6ebc844459645e93e79635d 100644 |
--- a/Source/core/html/track/TrackBase.h |
+++ b/Source/core/html/track/TrackBase.h |
@@ -27,15 +27,20 @@ |
#define TrackBase_h |
#include "platform/heap/Handle.h" |
+#include "public/platform/WebMediaPlayer.h" |
#include "wtf/RefCounted.h" |
#include "wtf/text/AtomicString.h" |
namespace WebCore { |
+class HTMLMediaElement; |
+ |
class TrackBase : public RefCountedWillBeRefCountedGarbageCollected<TrackBase> { |
public: |
virtual ~TrackBase(); |
+ blink::WebMediaPlayer::TrackId trackId() const { return m_trackId; } |
+ |
enum Type { TextTrack, AudioTrack, VideoTrack }; |
Type type() const { return m_type; } |
@@ -48,23 +53,29 @@ public: |
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; } |
+ String id() const { return m_id; } |
+ void setId(const String& id) { m_id = id; } |
+ |
+ void setMediaElement(HTMLMediaElement* mediaElement) { m_mediaElement = mediaElement; } |
+ HTMLMediaElement* mediaElement() const { return m_mediaElement; } |
+ Node* owner() const; |
- virtual void trace(Visitor*) { } |
+ virtual void trace(Visitor*); |
protected: |
- TrackBase(Type, const AtomicString& label, const AtomicString& language, const AtomicString& id); |
+ TrackBase(Type, const AtomicString& label, const AtomicString& language, const String& id); |
virtual bool isValidKind(const AtomicString&) const = 0; |
virtual AtomicString defaultKind() const = 0; |
private: |
+ blink::WebMediaPlayer::TrackId m_trackId; |
Type m_type; |
AtomicString m_kind; |
AtomicString m_label; |
AtomicString m_language; |
- AtomicString m_id; |
+ String m_id; |
+ RawPtrWillBeMember<HTMLMediaElement> m_mediaElement; |
}; |
} // namespace WebCore |