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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 void HTMLTrackElement::newCuesAvailable(TextTrackLoader* loader) { | 280 void HTMLTrackElement::newCuesAvailable(TextTrackLoader* loader) { |
281 DCHECK_EQ(m_loader, loader); | 281 DCHECK_EQ(m_loader, loader); |
282 DCHECK(m_track); | 282 DCHECK(m_track); |
283 | 283 |
284 HeapVector<Member<TextTrackCue>> newCues; | 284 HeapVector<Member<TextTrackCue>> newCues; |
285 m_loader->getNewCues(newCues); | 285 m_loader->getNewCues(newCues); |
286 | 286 |
287 m_track->addListOfCues(newCues); | 287 m_track->addListOfCues(newCues); |
288 } | 288 } |
289 | 289 |
290 void HTMLTrackElement::newRegionsAvailable(TextTrackLoader* loader) { | |
291 DCHECK_EQ(m_loader, loader); | |
292 DCHECK(m_track); | |
293 | |
294 HeapVector<Member<VTTRegion>> newRegions; | |
295 m_loader->getNewRegions(newRegions); | |
296 | |
297 m_track->addRegions(newRegions); | |
298 } | |
299 | |
300 void HTMLTrackElement::cueLoadingCompleted(TextTrackLoader* loader, | 290 void HTMLTrackElement::cueLoadingCompleted(TextTrackLoader* loader, |
301 bool loadingFailed) { | 291 bool loadingFailed) { |
302 DCHECK_EQ(m_loader, loader); | 292 DCHECK_EQ(m_loader, loader); |
303 | 293 |
304 didCompleteLoad(loadingFailed ? Failure : Success); | 294 didCompleteLoad(loadingFailed ? Failure : Success); |
305 } | 295 } |
306 | 296 |
307 // NOTE: The values in the TextTrack::ReadinessState enum must stay in sync with | 297 // NOTE: The values in the TextTrack::ReadinessState enum must stay in sync with |
308 // those in HTMLTrackElement::ReadyState. | 298 // those in HTMLTrackElement::ReadyState. |
309 static_assert( | 299 static_assert( |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 return nullptr; | 338 return nullptr; |
349 } | 339 } |
350 | 340 |
351 DEFINE_TRACE(HTMLTrackElement) { | 341 DEFINE_TRACE(HTMLTrackElement) { |
352 visitor->trace(m_track); | 342 visitor->trace(m_track); |
353 visitor->trace(m_loader); | 343 visitor->trace(m_loader); |
354 HTMLElement::trace(visitor); | 344 HTMLElement::trace(visitor); |
355 } | 345 } |
356 | 346 |
357 } // namespace blink | 347 } // namespace blink |
OLD | NEW |