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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 // destructed ActiveDOMObject::executionContext() returns 0. | 318 // destructed ActiveDOMObject::executionContext() returns 0. |
319 if (ActiveDOMObject::executionContext()) | 319 if (ActiveDOMObject::executionContext()) |
320 setShouldDelayLoadEvent(false); | 320 setShouldDelayLoadEvent(false); |
321 #else | 321 #else |
322 setShouldDelayLoadEvent(false); | 322 setShouldDelayLoadEvent(false); |
323 #endif | 323 #endif |
324 | 324 |
325 #if !ENABLE(OILPAN) | 325 #if !ENABLE(OILPAN) |
326 if (m_textTracks) | 326 if (m_textTracks) |
327 m_textTracks->clearOwner(); | 327 m_textTracks->clearOwner(); |
328 #endif | |
329 | 328 |
330 if (m_mediaController) { | 329 if (m_mediaController) { |
331 m_mediaController->removeMediaElement(this); | 330 m_mediaController->removeMediaElement(this); |
332 m_mediaController = nullptr; | 331 m_mediaController = nullptr; |
333 } | 332 } |
| 333 #endif |
334 | 334 |
335 closeMediaSource(); | 335 closeMediaSource(); |
336 | 336 |
337 #if !ENABLE(OILPAN) | 337 #if !ENABLE(OILPAN) |
338 removeElementFromDocumentMap(this, &document()); | 338 removeElementFromDocumentMap(this, &document()); |
339 #endif | 339 #endif |
340 | 340 |
341 // Destroying the player may cause a resource load to be canceled, | 341 // Destroying the player may cause a resource load to be canceled, |
342 // which could result in userCancelledLoad() being called back. | 342 // which could result in userCancelledLoad() being called back. |
343 // Setting m_completelyLoaded ensures that such a call will not cause | 343 // Setting m_completelyLoaded ensures that such a call will not cause |
(...skipping 3162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3506 | 3506 |
3507 // Otherwise, let controller be a newly created MediaController. | 3507 // Otherwise, let controller be a newly created MediaController. |
3508 setControllerInternal(MediaController::create(Node::executionContext())); | 3508 setControllerInternal(MediaController::create(Node::executionContext())); |
3509 } | 3509 } |
3510 | 3510 |
3511 MediaController* HTMLMediaElement::controller() const | 3511 MediaController* HTMLMediaElement::controller() const |
3512 { | 3512 { |
3513 return m_mediaController.get(); | 3513 return m_mediaController.get(); |
3514 } | 3514 } |
3515 | 3515 |
3516 void HTMLMediaElement::setController(PassRefPtr<MediaController> controller) | 3516 void HTMLMediaElement::setController(PassRefPtrWillBeRawPtr<MediaController> con
troller) |
3517 { | 3517 { |
3518 // 4.8.10.11.2 Media controllers: controller attribute. | 3518 // 4.8.10.11.2 Media controllers: controller attribute. |
3519 // On setting, it must first remove the element's mediagroup attribute, if a
ny, | 3519 // On setting, it must first remove the element's mediagroup attribute, if a
ny, |
3520 removeAttribute(mediagroupAttr); | 3520 removeAttribute(mediagroupAttr); |
3521 // and then set the current media controller to the given value. | 3521 // and then set the current media controller to the given value. |
3522 setControllerInternal(controller); | 3522 setControllerInternal(controller); |
3523 } | 3523 } |
3524 | 3524 |
3525 void HTMLMediaElement::setControllerInternal(PassRefPtr<MediaController> control
ler) | 3525 void HTMLMediaElement::setControllerInternal(PassRefPtrWillBeRawPtr<MediaControl
ler> controller) |
3526 { | 3526 { |
3527 if (m_mediaController) | 3527 if (m_mediaController) |
3528 m_mediaController->removeMediaElement(this); | 3528 m_mediaController->removeMediaElement(this); |
3529 | 3529 |
3530 m_mediaController = controller; | 3530 m_mediaController = controller; |
3531 | 3531 |
3532 if (m_mediaController) | 3532 if (m_mediaController) |
3533 m_mediaController->addMediaElement(this); | 3533 m_mediaController->addMediaElement(this); |
3534 } | 3534 } |
3535 | 3535 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3650 HTMLElement::defaultEventHandler(event); | 3650 HTMLElement::defaultEventHandler(event); |
3651 } | 3651 } |
3652 | 3652 |
3653 void HTMLMediaElement::trace(Visitor* visitor) | 3653 void HTMLMediaElement::trace(Visitor* visitor) |
3654 { | 3654 { |
3655 visitor->trace(m_error); | 3655 visitor->trace(m_error); |
3656 visitor->trace(m_currentSourceNode); | 3656 visitor->trace(m_currentSourceNode); |
3657 visitor->trace(m_nextChildNodeToConsider); | 3657 visitor->trace(m_nextChildNodeToConsider); |
3658 visitor->trace(m_textTracks); | 3658 visitor->trace(m_textTracks); |
3659 visitor->trace(m_textTracksWhenResourceSelectionBegan); | 3659 visitor->trace(m_textTracksWhenResourceSelectionBegan); |
| 3660 visitor->trace(m_mediaController); |
3660 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor); | 3661 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor); |
3661 HTMLElement::trace(visitor); | 3662 HTMLElement::trace(visitor); |
3662 } | 3663 } |
3663 | 3664 |
3664 } | 3665 } |
OLD | NEW |