| Index: Source/core/html/track/TextTrack.h
|
| diff --git a/Source/core/html/track/TextTrack.h b/Source/core/html/track/TextTrack.h
|
| index 721c55566b031eea4173915049b677c0fea857f5..c430c8374192f9b2d1c13131aff313769df58357 100644
|
| --- a/Source/core/html/track/TextTrack.h
|
| +++ b/Source/core/html/track/TextTrack.h
|
| @@ -28,6 +28,7 @@
|
| #define TextTrack_h
|
|
|
| #include "bindings/v8/ScriptWrappable.h"
|
| +#include "core/events/EventTarget.h"
|
| #include "core/html/track/TrackBase.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| @@ -39,6 +40,7 @@ class HTMLMediaElement;
|
| class TextTrack;
|
| class TextTrackCue;
|
| class TextTrackCueList;
|
| +class TextTrackList;
|
| class VTTRegion;
|
| class VTTRegionList;
|
|
|
| @@ -53,7 +55,8 @@ public:
|
| virtual void textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue>) = 0;
|
| };
|
|
|
| -class TextTrack : public TrackBase, public ScriptWrappable {
|
| +class TextTrack : public TrackBase, public ScriptWrappable, public EventTargetWithInlineData {
|
| + REFCOUNTED_EVENT_TARGET(TrackBase);
|
| public:
|
| static PassRefPtr<TextTrack> create(Document& document, TextTrackClient* client, const AtomicString& kind, const AtomicString& label, const AtomicString& language)
|
| {
|
| @@ -61,11 +64,10 @@ public:
|
| }
|
| virtual ~TextTrack();
|
|
|
| - void setMediaElement(HTMLMediaElement* element) { m_mediaElement = element; }
|
| - HTMLMediaElement* mediaElement() { return m_mediaElement; }
|
| + void setTrackList(TextTrackList* trackList) { m_trackList = trackList; }
|
| + TextTrackList* trackList() { return m_trackList; }
|
|
|
| - const AtomicString& kind() const { return m_kind; }
|
| - void setKind(const AtomicString&);
|
| + virtual void setKind(const AtomicString&) OVERRIDE;
|
|
|
| static const AtomicString& subtitlesKeyword();
|
| static const AtomicString& captionsKeyword();
|
| @@ -74,15 +76,6 @@ public:
|
| static const AtomicString& metadataKeyword();
|
| static bool isValidKindKeyword(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; }
|
| -
|
| static const AtomicString& disabledKeyword();
|
| static const AtomicString& hiddenKeyword();
|
| static const AtomicString& showingKeyword();
|
| @@ -138,6 +131,9 @@ public:
|
| protected:
|
| TextTrack(Document&, TextTrackClient*, const AtomicString& kind, const AtomicString& label, const AtomicString& language, const AtomicString& id, TextTrackType);
|
|
|
| + virtual bool isValidKind(const AtomicString& kind) const OVERRIDE { return isValidKindKeyword(kind); }
|
| + virtual AtomicString defaultKind() const OVERRIDE { return subtitlesKeyword(); }
|
| +
|
| RefPtr<TextTrackCueList> m_cues;
|
|
|
| private:
|
| @@ -149,11 +145,7 @@ private:
|
| // FIXME: Remove this pointer and get the Document from m_client
|
| Document* m_document;
|
|
|
| - HTMLMediaElement* m_mediaElement;
|
| - AtomicString m_kind;
|
| - AtomicString m_label;
|
| - AtomicString m_language;
|
| - AtomicString m_id;
|
| + TextTrackList* m_trackList;
|
| AtomicString m_mode;
|
| TextTrackClient* m_client;
|
| TextTrackType m_trackType;
|
|
|