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

Side by Side Diff: Source/core/html/track/LoadableTextTrack.cpp

Issue 910843002: Hoist checks for 'disabled' tracks out of textTrackAddCue{,s} (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Missed a spot. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/track/TextTrack.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 m_loader->getNewCues(newCues); 123 m_loader->getNewCues(newCues);
124 124
125 if (!m_cues) 125 if (!m_cues)
126 m_cues = TextTrackCueList::create(); 126 m_cues = TextTrackCueList::create();
127 127
128 for (size_t i = 0; i < newCues.size(); ++i) { 128 for (size_t i = 0; i < newCues.size(); ++i) {
129 newCues[i]->setTrack(this); 129 newCues[i]->setTrack(this);
130 m_cues->add(newCues[i].release()); 130 m_cues->add(newCues[i].release());
131 } 131 }
132 132
133 if (mediaElement()) 133 if (mediaElement() && mode() != disabledKeyword())
134 mediaElement()->textTrackAddCues(this, m_cues.get()); 134 mediaElement()->textTrackAddCues(this, m_cues.get());
135 } 135 }
136 136
137 void LoadableTextTrack::cueLoadingCompleted(TextTrackLoader* loader, bool loadin gFailed) 137 void LoadableTextTrack::cueLoadingCompleted(TextTrackLoader* loader, bool loadin gFailed)
138 { 138 {
139 ASSERT_UNUSED(loader, m_loader == loader); 139 ASSERT_UNUSED(loader, m_loader == loader);
140 140
141 #if !ENABLE(OILPAN) 141 #if !ENABLE(OILPAN)
142 if (!m_trackElement) 142 if (!m_trackElement)
143 return; 143 return;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 179
180 void LoadableTextTrack::trace(Visitor* visitor) 180 void LoadableTextTrack::trace(Visitor* visitor)
181 { 181 {
182 visitor->trace(m_trackElement); 182 visitor->trace(m_trackElement);
183 visitor->trace(m_loader); 183 visitor->trace(m_loader);
184 TextTrack::trace(visitor); 184 TextTrack::trace(visitor);
185 } 185 }
186 186
187 } // namespace blink 187 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/track/TextTrack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698