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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 static const AtomicString& showingKeyword(); | 72 static const AtomicString& showingKeyword(); |
73 | 73 |
74 AtomicString mode() const { return m_mode; } | 74 AtomicString mode() const { return m_mode; } |
75 virtual void setMode(const AtomicString&); | 75 virtual void setMode(const AtomicString&); |
76 | 76 |
77 enum ReadinessState { NotLoaded = 0, Loading = 1, Loaded = 2, FailedToLoad =
3 }; | 77 enum ReadinessState { NotLoaded = 0, Loading = 1, Loaded = 2, FailedToLoad =
3 }; |
78 ReadinessState readinessState() const { return m_readinessState; } | 78 ReadinessState readinessState() const { return m_readinessState; } |
79 void setReadinessState(ReadinessState state) { m_readinessState = state; } | 79 void setReadinessState(ReadinessState state) { m_readinessState = state; } |
80 | 80 |
81 TextTrackCueList* cues(); | 81 TextTrackCueList* cues(); |
82 TextTrackCueList* activeCues() const; | 82 TextTrackCueList* activeCues(); |
83 | 83 |
84 HTMLMediaElement* mediaElement() const; | 84 HTMLMediaElement* mediaElement() const; |
85 Node* owner() const; | 85 Node* owner() const; |
86 | 86 |
87 void addCue(PassRefPtrWillBeRawPtr<TextTrackCue>); | 87 void addCue(PassRefPtrWillBeRawPtr<TextTrackCue>); |
88 void removeCue(TextTrackCue*, ExceptionState&); | 88 void removeCue(TextTrackCue*, ExceptionState&); |
89 | 89 |
90 VTTRegionList* regions(); | 90 VTTRegionList* regions(); |
91 void addRegion(PassRefPtrWillBeRawPtr<VTTRegion>); | 91 void addRegion(PassRefPtrWillBeRawPtr<VTTRegion>); |
92 void removeRegion(VTTRegion*, ExceptionState&); | 92 void removeRegion(VTTRegion*, ExceptionState&); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 virtual bool isValidKind(const AtomicString& kind) const override { return i
sValidKindKeyword(kind); } | 125 virtual bool isValidKind(const AtomicString& kind) const override { return i
sValidKindKeyword(kind); } |
126 virtual AtomicString defaultKind() const override { return subtitlesKeyword(
); } | 126 virtual AtomicString defaultKind() const override { return subtitlesKeyword(
); } |
127 | 127 |
128 void addListOfCues(WillBeHeapVector<RefPtrWillBeMember<TextTrackCue>>&); | 128 void addListOfCues(WillBeHeapVector<RefPtrWillBeMember<TextTrackCue>>&); |
129 | 129 |
130 private: | 130 private: |
131 CueTimeline* cueTimeline() const; | 131 CueTimeline* cueTimeline() const; |
132 | 132 |
133 TextTrackCueList* ensureTextTrackCueList(); | 133 TextTrackCueList* ensureTextTrackCueList(); |
134 RefPtrWillBeMember<TextTrackCueList> m_cues; | 134 RefPtrWillBeMember<TextTrackCueList> m_cues; |
| 135 RefPtrWillBeMember<TextTrackCueList> m_activeCues; |
135 | 136 |
136 VTTRegionList* ensureVTTRegionList(); | 137 VTTRegionList* ensureVTTRegionList(); |
137 RefPtrWillBeMember<VTTRegionList> m_regions; | 138 RefPtrWillBeMember<VTTRegionList> m_regions; |
138 | 139 |
139 RawPtrWillBeMember<TextTrackList> m_trackList; | 140 RawPtrWillBeMember<TextTrackList> m_trackList; |
140 AtomicString m_mode; | 141 AtomicString m_mode; |
141 TextTrackType m_trackType; | 142 TextTrackType m_trackType; |
142 ReadinessState m_readinessState; | 143 ReadinessState m_readinessState; |
143 int m_trackIndex; | 144 int m_trackIndex; |
144 int m_renderedTrackIndex; | 145 int m_renderedTrackIndex; |
145 bool m_hasBeenConfigured; | 146 bool m_hasBeenConfigured; |
146 }; | 147 }; |
147 | 148 |
148 DEFINE_TRACK_TYPE_CASTS(TextTrack, TrackBase::TextTrack); | 149 DEFINE_TRACK_TYPE_CASTS(TextTrack, TrackBase::TextTrack); |
149 | 150 |
150 } // namespace blink | 151 } // namespace blink |
151 | 152 |
152 #endif // TextTrack_h | 153 #endif // TextTrack_h |
OLD | NEW |