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

Side by Side Diff: Source/core/html/track/LoadableTextTrack.cpp

Issue 913133003: Move text track active list management to CueTimeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename to CueTimeline. Created 5 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 11 matching lines...) Expand all
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #include "config.h" 26 #include "config.h"
27 #include "core/html/track/LoadableTextTrack.h" 27 #include "core/html/track/LoadableTextTrack.h"
28 28
29 #include "core/dom/ElementTraversal.h" 29 #include "core/dom/ElementTraversal.h"
30 #include "core/html/HTMLMediaElement.h" 30 #include "core/html/HTMLMediaElement.h"
31 #include "core/html/HTMLTrackElement.h" 31 #include "core/html/HTMLTrackElement.h"
32 #include "core/html/track/CueTimeline.h"
32 #include "core/html/track/TextTrackCueList.h" 33 #include "core/html/track/TextTrackCueList.h"
33 #include "core/html/track/vtt/VTTRegionList.h" 34 #include "core/html/track/vtt/VTTRegionList.h"
34 35
35 namespace blink { 36 namespace blink {
36 37
37 using namespace HTMLNames; 38 using namespace HTMLNames;
38 39
39 LoadableTextTrack::LoadableTextTrack(HTMLTrackElement* track) 40 LoadableTextTrack::LoadableTextTrack(HTMLTrackElement* track)
40 : TextTrack(emptyAtom, emptyAtom, emptyAtom, emptyAtom, TrackElement) 41 : TextTrack(emptyAtom, emptyAtom, emptyAtom, emptyAtom, TrackElement)
41 , m_trackElement(track) 42 , m_trackElement(track)
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 m_loader->getNewCues(newCues); 124 m_loader->getNewCues(newCues);
124 125
125 if (!m_cues) 126 if (!m_cues)
126 m_cues = TextTrackCueList::create(); 127 m_cues = TextTrackCueList::create();
127 128
128 for (size_t i = 0; i < newCues.size(); ++i) { 129 for (size_t i = 0; i < newCues.size(); ++i) {
129 newCues[i]->setTrack(this); 130 newCues[i]->setTrack(this);
130 m_cues->add(newCues[i].release()); 131 m_cues->add(newCues[i].release());
131 } 132 }
132 133
133 if (mediaElement() && mode() != disabledKeyword()) 134 if (cueTimeline() && mode() != disabledKeyword())
134 mediaElement()->textTrackAddCues(this, m_cues.get()); 135 cueTimeline()->addCues(this, m_cues.get());
135 } 136 }
136 137
137 void LoadableTextTrack::cueLoadingCompleted(TextTrackLoader* loader, bool loadin gFailed) 138 void LoadableTextTrack::cueLoadingCompleted(TextTrackLoader* loader, bool loadin gFailed)
138 { 139 {
139 ASSERT_UNUSED(loader, m_loader == loader); 140 ASSERT_UNUSED(loader, m_loader == loader);
140 141
141 #if !ENABLE(OILPAN) 142 #if !ENABLE(OILPAN)
142 if (!m_trackElement) 143 if (!m_trackElement)
143 return; 144 return;
144 #endif 145 #endif
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 179 }
179 180
180 void LoadableTextTrack::trace(Visitor* visitor) 181 void LoadableTextTrack::trace(Visitor* visitor)
181 { 182 {
182 visitor->trace(m_trackElement); 183 visitor->trace(m_trackElement);
183 visitor->trace(m_loader); 184 visitor->trace(m_loader);
184 TextTrack::trace(visitor); 185 TextTrack::trace(visitor);
185 } 186 }
186 187
187 } // namespace blink 188 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698