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

Unified Diff: Source/core/html/track/LoadableTextTrack.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 | « no previous file | Source/core/html/track/TextTrack.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/LoadableTextTrack.cpp
diff --git a/Source/core/html/track/LoadableTextTrack.cpp b/Source/core/html/track/LoadableTextTrack.cpp
index b81993831054dcbdb94dfb6d06c9e7700d40c254..35cf8f5a8f67d8c6040c1e881dcb4480a88d10a9 100644
--- a/Source/core/html/track/LoadableTextTrack.cpp
+++ b/Source/core/html/track/LoadableTextTrack.cpp
@@ -29,8 +29,6 @@
#include "core/dom/ElementTraversal.h"
#include "core/html/HTMLMediaElement.h"
#include "core/html/HTMLTrackElement.h"
-#include "core/html/track/CueTimeline.h"
-#include "core/html/track/TextTrackCueList.h"
#include "core/html/track/vtt/VTTRegionList.h"
namespace blink {
@@ -120,19 +118,10 @@ void LoadableTextTrack::newCuesAvailable(TextTrackLoader* loader)
{
ASSERT_UNUSED(loader, m_loader == loader);
- WillBeHeapVector<RefPtrWillBeMember<VTTCue>> newCues;
+ WillBeHeapVector<RefPtrWillBeMember<TextTrackCue>> newCues;
m_loader->getNewCues(newCues);
- if (!m_cues)
- m_cues = TextTrackCueList::create();
-
- for (size_t i = 0; i < newCues.size(); ++i) {
- newCues[i]->setTrack(this);
- m_cues->add(newCues[i].release());
- }
-
- if (cueTimeline() && mode() != disabledKeyword())
- cueTimeline()->addCues(this, m_cues.get());
+ addListOfCues(newCues);
}
void LoadableTextTrack::cueLoadingCompleted(TextTrackLoader* loader, bool loadingFailed)
« no previous file with comments | « no previous file | Source/core/html/track/TextTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698