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

Side by Side Diff: third_party/WebKit/Source/core/html/track/CueTimeline.cpp

Issue 2617433002: Use the standard downcasting macros for downcasting TextTrack objects. (Closed)
Patch Set: . Created 3 years, 11 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/track/CueTimeline.h" 5 #include "core/html/track/CueTimeline.h"
6 6
7 #include "core/events/Event.h" 7 #include "core/events/Event.h"
8 #include "core/html/HTMLMediaElement.h" 8 #include "core/html/HTMLMediaElement.h"
9 #include "core/html/HTMLTrackElement.h" 9 #include "core/html/HTMLTrackElement.h"
10 #include "core/html/track/LoadableTextTrack.h" 10 #include "core/html/track/LoadableTextTrack.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // task to fire a simple event named cuechange at the TextTrack object, and, 320 // task to fire a simple event named cuechange at the TextTrack object, and,
321 // ... 321 // ...
322 for (const auto& track : affectedTracks) { 322 for (const auto& track : affectedTracks) {
323 mediaElement.scheduleEvent( 323 mediaElement.scheduleEvent(
324 createEventWithTarget(EventTypeNames::cuechange, track.get())); 324 createEventWithTarget(EventTypeNames::cuechange, track.get()));
325 325
326 // ... if the text track has a corresponding track element, to then fire a 326 // ... if the text track has a corresponding track element, to then fire a
327 // simple event named cuechange at the track element as well. 327 // simple event named cuechange at the track element as well.
328 if (track->trackType() == TextTrack::TrackElement) { 328 if (track->trackType() == TextTrack::TrackElement) {
329 HTMLTrackElement* trackElement = 329 HTMLTrackElement* trackElement =
330 static_cast<LoadableTextTrack*>(track.get())->trackElement(); 330 toLoadableTextTrack(track.get())->trackElement();
331 DCHECK(trackElement); 331 DCHECK(trackElement);
332 mediaElement.scheduleEvent( 332 mediaElement.scheduleEvent(
333 createEventWithTarget(EventTypeNames::cuechange, trackElement)); 333 createEventWithTarget(EventTypeNames::cuechange, trackElement));
334 } 334 }
335 } 335 }
336 336
337 // 16 - Set the text track cue active flag of all the cues in the current 337 // 16 - Set the text track cue active flag of all the cues in the current
338 // cues, and unset the text track cue active flag of all the cues in the 338 // cues, and unset the text track cue active flag of all the cues in the
339 // other cues. 339 // other cues.
340 for (const auto& cue : currentCues) 340 for (const auto& cue : currentCues)
(...skipping 21 matching lines...) Expand all
362 --m_ignoreUpdate; 362 --m_ignoreUpdate;
363 if (!m_ignoreUpdate) 363 if (!m_ignoreUpdate)
364 updateActiveCues(mediaElement().currentTime()); 364 updateActiveCues(mediaElement().currentTime());
365 } 365 }
366 366
367 DEFINE_TRACE(CueTimeline) { 367 DEFINE_TRACE(CueTimeline) {
368 visitor->trace(m_mediaElement); 368 visitor->trace(m_mediaElement);
369 } 369 }
370 370
371 } // namespace blink 371 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ('k') | third_party/WebKit/Source/core/html/track/InbandTextTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698