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

Side by Side Diff: Source/core/loader/TextTrackLoader.cpp

Issue 25798003: Enable WebVTT regions for runtime testing, updated tests and minor fixes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 2 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/loader/TextTrackLoader.h ('k') | Source/core/page/RuntimeEnabledFeatures.in » ('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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 void TextTrackLoader::newCuesParsed() 179 void TextTrackLoader::newCuesParsed()
180 { 180 {
181 if (m_cueLoadTimer.isActive()) 181 if (m_cueLoadTimer.isActive())
182 return; 182 return;
183 183
184 m_newCuesAvailable = true; 184 m_newCuesAvailable = true;
185 m_cueLoadTimer.startOneShot(0); 185 m_cueLoadTimer.startOneShot(0);
186 } 186 }
187 187
188 #if ENABLE(WEBVTT_REGIONS)
189 void TextTrackLoader::newRegionsParsed() 188 void TextTrackLoader::newRegionsParsed()
190 { 189 {
191 m_client->newRegionsAvailable(this); 190 m_client->newRegionsAvailable(this);
192 } 191 }
193 #endif
194 192
195 void TextTrackLoader::fileFailedToParse() 193 void TextTrackLoader::fileFailedToParse()
196 { 194 {
197 LOG(Media, "TextTrackLoader::fileFailedToParse"); 195 LOG(Media, "TextTrackLoader::fileFailedToParse");
198 196
199 m_state = Failed; 197 m_state = Failed;
200 198
201 if (!m_cueLoadTimer.isActive()) 199 if (!m_cueLoadTimer.isActive())
202 m_cueLoadTimer.startOneShot(0); 200 m_cueLoadTimer.startOneShot(0);
203 201
204 cancelLoad(); 202 cancelLoad();
205 } 203 }
206 204
207 void TextTrackLoader::getNewCues(Vector<RefPtr<TextTrackCue> >& outputCues) 205 void TextTrackLoader::getNewCues(Vector<RefPtr<TextTrackCue> >& outputCues)
208 { 206 {
209 ASSERT(m_cueParser); 207 ASSERT(m_cueParser);
210 if (m_cueParser) 208 if (m_cueParser)
211 m_cueParser->getNewCues(outputCues); 209 m_cueParser->getNewCues(outputCues);
212 } 210 }
213 211
214 #if ENABLE(WEBVTT_REGIONS)
215 void TextTrackLoader::getNewRegions(Vector<RefPtr<TextTrackRegion> >& outputRegi ons) 212 void TextTrackLoader::getNewRegions(Vector<RefPtr<TextTrackRegion> >& outputRegi ons)
216 { 213 {
217 ASSERT(m_cueParser); 214 ASSERT(m_cueParser);
218 if (m_cueParser) 215 if (m_cueParser)
219 m_cueParser->getNewRegions(outputRegions); 216 m_cueParser->getNewRegions(outputRegions);
220 } 217 }
221 #endif
222 } 218 }
223 219
OLDNEW
« no previous file with comments | « Source/core/loader/TextTrackLoader.h ('k') | Source/core/page/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698