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 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #include "bindings/core/v8/ExceptionState.h" | 29 #include "bindings/core/v8/ExceptionState.h" |
30 #include "bindings/core/v8/ExceptionStatePlaceholder.h" | 30 #include "bindings/core/v8/ExceptionStatePlaceholder.h" |
31 #include "bindings/core/v8/ScriptController.h" | 31 #include "bindings/core/v8/ScriptController.h" |
32 #include "bindings/core/v8/ScriptEventListener.h" | 32 #include "bindings/core/v8/ScriptEventListener.h" |
33 #include "core/HTMLNames.h" | 33 #include "core/HTMLNames.h" |
34 #include "core/css/MediaList.h" | 34 #include "core/css/MediaList.h" |
35 #include "core/dom/Attribute.h" | 35 #include "core/dom/Attribute.h" |
36 #include "core/dom/ElementTraversal.h" | 36 #include "core/dom/ElementTraversal.h" |
37 #include "core/dom/ExceptionCode.h" | 37 #include "core/dom/ExceptionCode.h" |
38 #include "core/dom/FullscreenElementStack.h" | 38 #include "core/dom/Fullscreen.h" |
39 #include "core/dom/shadow/ShadowRoot.h" | 39 #include "core/dom/shadow/ShadowRoot.h" |
40 #include "core/events/Event.h" | 40 #include "core/events/Event.h" |
41 #include "core/frame/LocalFrame.h" | 41 #include "core/frame/LocalFrame.h" |
42 #include "core/frame/Settings.h" | 42 #include "core/frame/Settings.h" |
43 #include "core/frame/UseCounter.h" | 43 #include "core/frame/UseCounter.h" |
44 #include "core/frame/csp/ContentSecurityPolicy.h" | 44 #include "core/frame/csp/ContentSecurityPolicy.h" |
45 #include "core/html/HTMLMediaSource.h" | 45 #include "core/html/HTMLMediaSource.h" |
46 #include "core/html/HTMLSourceElement.h" | 46 #include "core/html/HTMLSourceElement.h" |
47 #include "core/html/HTMLTrackElement.h" | 47 #include "core/html/HTMLTrackElement.h" |
48 #include "core/html/MediaController.h" | 48 #include "core/html/MediaController.h" |
(...skipping 3434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3483 // controller and so it will clear itself on destruction. | 3483 // controller and so it will clear itself on destruction. |
3484 #if !ENABLE(OILPAN) | 3484 #if !ENABLE(OILPAN) |
3485 if (m_mediaController) | 3485 if (m_mediaController) |
3486 m_mediaController->clearExecutionContext(); | 3486 m_mediaController->clearExecutionContext(); |
3487 #endif | 3487 #endif |
3488 ActiveDOMObject::contextDestroyed(); | 3488 ActiveDOMObject::contextDestroyed(); |
3489 } | 3489 } |
3490 | 3490 |
3491 bool HTMLMediaElement::isFullscreen() const | 3491 bool HTMLMediaElement::isFullscreen() const |
3492 { | 3492 { |
3493 return FullscreenElementStack::isActiveFullScreenElement(*this); | 3493 return Fullscreen::isActiveFullScreenElement(*this); |
3494 } | 3494 } |
3495 | 3495 |
3496 void HTMLMediaElement::enterFullscreen() | 3496 void HTMLMediaElement::enterFullscreen() |
3497 { | 3497 { |
3498 WTF_LOG(Media, "HTMLMediaElement::enterFullscreen"); | 3498 WTF_LOG(Media, "HTMLMediaElement::enterFullscreen"); |
3499 | 3499 |
3500 FullscreenElementStack::from(document()).requestFullscreen(*this, Fullscreen
ElementStack::PrefixedVideoRequest); | 3500 Fullscreen::from(document()).requestFullscreen(*this, Fullscreen::PrefixedVi
deoRequest); |
3501 } | 3501 } |
3502 | 3502 |
3503 void HTMLMediaElement::exitFullscreen() | 3503 void HTMLMediaElement::exitFullscreen() |
3504 { | 3504 { |
3505 WTF_LOG(Media, "HTMLMediaElement::exitFullscreen"); | 3505 WTF_LOG(Media, "HTMLMediaElement::exitFullscreen"); |
3506 | 3506 |
3507 FullscreenElementStack::from(document()).exitFullscreen(); | 3507 Fullscreen::from(document()).exitFullscreen(); |
3508 } | 3508 } |
3509 | 3509 |
3510 void HTMLMediaElement::didBecomeFullscreenElement() | 3510 void HTMLMediaElement::didBecomeFullscreenElement() |
3511 { | 3511 { |
3512 if (hasMediaControls()) | 3512 if (hasMediaControls()) |
3513 mediaControls()->enteredFullscreen(); | 3513 mediaControls()->enteredFullscreen(); |
3514 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isHTMLVideoEl
ement(*this)) | 3514 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isHTMLVideoEl
ement(*this)) |
3515 document().renderView()->compositor()->setNeedsCompositingUpdate(Composi
tingUpdateRebuildTree); | 3515 document().renderView()->compositor()->setNeedsCompositingUpdate(Composi
tingUpdateRebuildTree); |
3516 } | 3516 } |
3517 | 3517 |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3989 | 3989 |
3990 #if ENABLE(WEB_AUDIO) | 3990 #if ENABLE(WEB_AUDIO) |
3991 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) | 3991 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) |
3992 { | 3992 { |
3993 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) | 3993 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) |
3994 audioSourceProvider()->setClient(0); | 3994 audioSourceProvider()->setClient(0); |
3995 } | 3995 } |
3996 #endif | 3996 #endif |
3997 | 3997 |
3998 } | 3998 } |
OLD | NEW |