OLD | NEW |
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 Loading... |
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 |
OLD | NEW |