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

Unified Diff: Source/core/html/track/TextTrack.cpp

Issue 941973005: Push cue timeline management out of LoadableTextTrack (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/track/TextTrack.h ('k') | Source/core/html/track/vtt/VTTParser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/TextTrack.cpp
diff --git a/Source/core/html/track/TextTrack.cpp b/Source/core/html/track/TextTrack.cpp
index 54f2cbdec176b2a2c6a4aefe59f6fb5adc5abd34..b96e6e5c6704727cba8d4cd690828d9895f4738b 100644
--- a/Source/core/html/track/TextTrack.cpp
+++ b/Source/core/html/track/TextTrack.cpp
@@ -210,6 +210,19 @@ void TextTrack::removeAllCues()
m_cues = nullptr;
}
+void TextTrack::addListOfCues(WillBeHeapVector<RefPtrWillBeMember<TextTrackCue>>& listOfNewCues)
+{
+ TextTrackCueList* cues = ensureTextTrackCueList();
+
+ for (auto& newCue : listOfNewCues) {
+ newCue->setTrack(this);
+ cues->add(newCue.release());
+ }
+
+ if (cueTimeline() && mode() != disabledKeyword())
+ cueTimeline()->addCues(this, cues);
+}
+
TextTrackCueList* TextTrack::activeCues() const
{
// 4.8.10.12.5 If the text track mode ... is not the text track disabled mode,
« no previous file with comments | « Source/core/html/track/TextTrack.h ('k') | Source/core/html/track/vtt/VTTParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698