Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 336 | 336 |
| 337 removeElementFromDocumentMap(this, &document()); | 337 removeElementFromDocumentMap(this, &document()); |
| 338 | 338 |
| 339 // Destroying the player may cause a resource load to be canceled, | 339 // Destroying the player may cause a resource load to be canceled, |
| 340 // which could result in userCancelledLoad() being called back. | 340 // which could result in userCancelledLoad() being called back. |
| 341 // Setting m_completelyLoaded ensures that such a call will not cause | 341 // Setting m_completelyLoaded ensures that such a call will not cause |
| 342 // us to dispatch an abort event, which would result in a crash. | 342 // us to dispatch an abort event, which would result in a crash. |
| 343 // See http://crbug.com/233654 for more details. | 343 // See http://crbug.com/233654 for more details. |
| 344 m_completelyLoaded = true; | 344 m_completelyLoaded = true; |
| 345 m_player.clear(); | 345 m_player.clear(); |
| 346 if (audioSourceProvider()) | |
|
DaleCurtis
2013/09/04 22:33:09
Both of these need protection via #if ENABLE(WEB_A
| |
| 347 audioSourceProvider()->setClient(0); | |
| 346 } | 348 } |
| 347 | 349 |
| 348 void HTMLMediaElement::didMoveToNewDocument(Document* oldDocument) | 350 void HTMLMediaElement::didMoveToNewDocument(Document* oldDocument) |
| 349 { | 351 { |
| 350 LOG(Media, "HTMLMediaElement::didMoveToNewDocument"); | 352 LOG(Media, "HTMLMediaElement::didMoveToNewDocument"); |
| 351 | 353 |
| 352 if (m_shouldDelayLoadEvent) { | 354 if (m_shouldDelayLoadEvent) { |
| 353 if (oldDocument) | 355 if (oldDocument) |
| 354 oldDocument->decrementLoadEventDelayCount(); | 356 oldDocument->decrementLoadEventDelayCount(); |
| 355 document().incrementLoadEventDelayCount(); | 357 document().incrementLoadEventDelayCount(); |
| (...skipping 3091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3447 updateActiveTextTrackCues(0); | 3449 updateActiveTextTrackCues(0); |
| 3448 } | 3450 } |
| 3449 | 3451 |
| 3450 void HTMLMediaElement::clearMediaPlayer(int flags) | 3452 void HTMLMediaElement::clearMediaPlayer(int flags) |
| 3451 { | 3453 { |
| 3452 removeAllInbandTracks(); | 3454 removeAllInbandTracks(); |
| 3453 | 3455 |
| 3454 closeMediaSource(); | 3456 closeMediaSource(); |
| 3455 | 3457 |
| 3456 m_player.clear(); | 3458 m_player.clear(); |
| 3459 if (audioSourceProvider()) | |
| 3460 audioSourceProvider()->setClient(0); | |
| 3457 stopPeriodicTimers(); | 3461 stopPeriodicTimers(); |
| 3458 m_loadTimer.stop(); | 3462 m_loadTimer.stop(); |
| 3459 | 3463 |
| 3460 m_pendingActionFlags &= ~flags; | 3464 m_pendingActionFlags &= ~flags; |
| 3461 m_loadState = WaitingForSource; | 3465 m_loadState = WaitingForSource; |
| 3462 | 3466 |
| 3463 if (m_textTracks) | 3467 if (m_textTracks) |
| 3464 configureTextTrackDisplay(); | 3468 configureTextTrackDisplay(); |
| 3465 } | 3469 } |
| 3466 | 3470 |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3981 { | 3985 { |
| 3982 m_restrictions = NoRestrictions; | 3986 m_restrictions = NoRestrictions; |
| 3983 } | 3987 } |
| 3984 | 3988 |
| 3985 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() | 3989 void HTMLMediaElement::mediaPlayerScheduleLayerUpdate() |
| 3986 { | 3990 { |
| 3987 scheduleLayerUpdate(); | 3991 scheduleLayerUpdate(); |
| 3988 } | 3992 } |
| 3989 | 3993 |
| 3990 } | 3994 } |
| OLD | NEW |