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

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

Issue 177003025: Remove TextTrackClient interface to simplify TextTrack code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 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/TextTrackList.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/TextTrackList.cpp
diff --git a/Source/core/html/track/TextTrackList.cpp b/Source/core/html/track/TextTrackList.cpp
index 375b14a2858b70bcc09df2e5f84854934b86a229..847ef25d6414a08b007dcc787f9ec3bf92fc3ee5 100644
--- a/Source/core/html/track/TextTrackList.cpp
+++ b/Source/core/html/track/TextTrackList.cpp
@@ -46,7 +46,13 @@ TextTrackList::TextTrackList(HTMLMediaElement* owner)
TextTrackList::~TextTrackList()
{
+ ASSERT(!m_owner);
+
m_asyncEventQueue->close();
+
+ for (unsigned i = 0; i < length(); ++i) {
+ item(i)->setTrackList(0);
+ }
}
unsigned TextTrackList::length() const
@@ -229,7 +235,6 @@ void TextTrackList::remove(TextTrack* track)
void TextTrackList::removeAllInbandTracks()
{
for (unsigned i = 0; i < m_inbandTracks.size(); ++i) {
- m_inbandTracks[i]->invalidateTrackIndex();
m_inbandTracks[i]->setTrackList(0);
}
m_inbandTracks.clear();
@@ -262,12 +267,9 @@ ExecutionContext* TextTrackList::executionContext() const
return m_owner->executionContext();
}
-void TextTrackList::clearOwnerAndClients()
+void TextTrackList::clearOwner()
{
m_owner = 0;
-
- for (unsigned i = 0; i < length(); ++i)
- item(i)->clearClient();
}
void TextTrackList::scheduleTrackEvent(const AtomicString& eventName, PassRefPtr<TextTrack> track)
« no previous file with comments | « Source/core/html/track/TextTrackList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698