| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 public: | 51 public: |
| 52 static TextTrack* create(const AtomicString& kind, const AtomicString& label
, const AtomicString& language) | 52 static TextTrack* create(const AtomicString& kind, const AtomicString& label
, const AtomicString& language) |
| 53 { | 53 { |
| 54 return new TextTrack(kind, label, language, emptyAtom, AddTrack); | 54 return new TextTrack(kind, label, language, emptyAtom, AddTrack); |
| 55 } | 55 } |
| 56 ~TextTrack() override; | 56 ~TextTrack() override; |
| 57 | 57 |
| 58 virtual void setTrackList(TextTrackList*); | 58 virtual void setTrackList(TextTrackList*); |
| 59 TextTrackList* trackList() { return m_trackList; } | 59 TextTrackList* trackList() { return m_trackList; } |
| 60 | 60 |
| 61 void setKind(const AtomicString&) override; | |
| 62 bool isVisualKind() const; | 61 bool isVisualKind() const; |
| 63 | 62 |
| 64 static const AtomicString& subtitlesKeyword(); | 63 static const AtomicString& subtitlesKeyword(); |
| 65 static const AtomicString& captionsKeyword(); | 64 static const AtomicString& captionsKeyword(); |
| 66 static const AtomicString& descriptionsKeyword(); | 65 static const AtomicString& descriptionsKeyword(); |
| 67 static const AtomicString& chaptersKeyword(); | 66 static const AtomicString& chaptersKeyword(); |
| 68 static const AtomicString& metadataKeyword(); | 67 static const AtomicString& metadataKeyword(); |
| 69 static bool isValidKindKeyword(const String&); | 68 static bool isValidKindKeyword(const String&); |
| 70 | 69 |
| 71 static const AtomicString& disabledKeyword(); | 70 static const AtomicString& disabledKeyword(); |
| 72 static const AtomicString& hiddenKeyword(); | 71 static const AtomicString& hiddenKeyword(); |
| 73 static const AtomicString& showingKeyword(); | 72 static const AtomicString& showingKeyword(); |
| 74 | 73 |
| 74 void setKind(const AtomicString& kind) { m_kind = kind; } |
| 75 void setLabel(const AtomicString& label) { m_label = label; } |
| 76 void setLanguage(const AtomicString& language) { m_language = language; } |
| 77 void setId(const String& id) { m_id = id; } |
| 78 |
| 75 AtomicString mode() const { return m_mode; } | 79 AtomicString mode() const { return m_mode; } |
| 76 virtual void setMode(const AtomicString&); | 80 virtual void setMode(const AtomicString&); |
| 77 | 81 |
| 78 enum ReadinessState { NotLoaded = 0, Loading = 1, Loaded = 2, FailedToLoad =
3 }; | 82 enum ReadinessState { NotLoaded = 0, Loading = 1, Loaded = 2, FailedToLoad =
3 }; |
| 79 ReadinessState getReadinessState() const { return m_readinessState; } | 83 ReadinessState getReadinessState() const { return m_readinessState; } |
| 80 void setReadinessState(ReadinessState state) { m_readinessState = state; } | 84 void setReadinessState(ReadinessState state) { m_readinessState = state; } |
| 81 | 85 |
| 82 TextTrackCueList* cues(); | 86 TextTrackCueList* cues(); |
| 83 TextTrackCueList* activeCues(); | 87 TextTrackCueList* activeCues(); |
| 84 | 88 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 int m_trackIndex; | 148 int m_trackIndex; |
| 145 int m_renderedTrackIndex; | 149 int m_renderedTrackIndex; |
| 146 bool m_hasBeenConfigured; | 150 bool m_hasBeenConfigured; |
| 147 }; | 151 }; |
| 148 | 152 |
| 149 DEFINE_TRACK_TYPE_CASTS(TextTrack, WebMediaPlayer::TextTrack); | 153 DEFINE_TRACK_TYPE_CASTS(TextTrack, WebMediaPlayer::TextTrack); |
| 150 | 154 |
| 151 } // namespace blink | 155 } // namespace blink |
| 152 | 156 |
| 153 #endif // TextTrack_h | 157 #endif // TextTrack_h |
| OLD | NEW |