| OLD | NEW |
| 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" |
| 11 #include "core/html/track/TextTrack.h" | 11 #include "core/html/track/TextTrack.h" |
| 12 #include "core/html/track/TextTrackCue.h" | 12 #include "core/html/track/TextTrackCue.h" |
| 13 #include "core/html/track/TextTrackCueList.h" | 13 #include "core/html/track/TextTrackCueList.h" |
| 14 #include "wtf/NonCopyingSort.h" | 14 #include "platform/wtf/NonCopyingSort.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 CueTimeline::CueTimeline(HTMLMediaElement& media_element) | 18 CueTimeline::CueTimeline(HTMLMediaElement& media_element) |
| 19 : media_element_(&media_element), | 19 : media_element_(&media_element), |
| 20 last_update_time_(-1), | 20 last_update_time_(-1), |
| 21 ignore_update_(0) {} | 21 ignore_update_(0) {} |
| 22 | 22 |
| 23 void CueTimeline::AddCues(TextTrack* track, const TextTrackCueList* cues) { | 23 void CueTimeline::AddCues(TextTrack* track, const TextTrackCueList* cues) { |
| 24 DCHECK_NE(track->mode(), TextTrack::DisabledKeyword()); | 24 DCHECK_NE(track->mode(), TextTrack::DisabledKeyword()); |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 --ignore_update_; | 364 --ignore_update_; |
| 365 if (!ignore_update_) | 365 if (!ignore_update_) |
| 366 UpdateActiveCues(MediaElement().currentTime()); | 366 UpdateActiveCues(MediaElement().currentTime()); |
| 367 } | 367 } |
| 368 | 368 |
| 369 DEFINE_TRACE(CueTimeline) { | 369 DEFINE_TRACE(CueTimeline) { |
| 370 visitor->Trace(media_element_); | 370 visitor->Trace(media_element_); |
| 371 } | 371 } |
| 372 | 372 |
| 373 } // namespace blink | 373 } // namespace blink |
| OLD | NEW |