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 2764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2775 } | 2775 } |
2776 | 2776 |
2777 void HTMLMediaElement::mediaPlayerRequestFullscreen() | 2777 void HTMLMediaElement::mediaPlayerRequestFullscreen() |
2778 { | 2778 { |
2779 WTF_LOG(Media, "HTMLMediaElement::mediaPlayerRequestFullscreen(%p)", this); | 2779 WTF_LOG(Media, "HTMLMediaElement::mediaPlayerRequestFullscreen(%p)", this); |
2780 | 2780 |
2781 // The player is responsible for only invoking this callback in response to | 2781 // The player is responsible for only invoking this callback in response to |
2782 // user interaction or when it is technically required to play the video. | 2782 // user interaction or when it is technically required to play the video. |
2783 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); | 2783 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); |
2784 | 2784 |
2785 Fullscreen::from(document()).requestFullscreen(*this, Fullscreen::InternalVi
deoRequest); | 2785 enterFullscreen(); |
2786 } | 2786 } |
2787 | 2787 |
2788 void HTMLMediaElement::mediaPlayerRequestSeek(double time) | 2788 void HTMLMediaElement::mediaPlayerRequestSeek(double time) |
2789 { | 2789 { |
2790 // The player is the source of this seek request. | 2790 // The player is the source of this seek request. |
2791 if (m_mediaController) { | 2791 if (m_mediaController) { |
2792 m_mediaController->setCurrentTime(time); | 2792 m_mediaController->setCurrentTime(time); |
2793 return; | 2793 return; |
2794 } | 2794 } |
2795 setCurrentTime(time, ASSERT_NO_EXCEPTION); | 2795 setCurrentTime(time, ASSERT_NO_EXCEPTION); |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3133 m_mediaController->clearExecutionContext(); | 3133 m_mediaController->clearExecutionContext(); |
3134 #endif | 3134 #endif |
3135 ActiveDOMObject::contextDestroyed(); | 3135 ActiveDOMObject::contextDestroyed(); |
3136 } | 3136 } |
3137 | 3137 |
3138 bool HTMLMediaElement::isFullscreen() const | 3138 bool HTMLMediaElement::isFullscreen() const |
3139 { | 3139 { |
3140 return Fullscreen::isActiveFullScreenElement(*this); | 3140 return Fullscreen::isActiveFullScreenElement(*this); |
3141 } | 3141 } |
3142 | 3142 |
| 3143 void HTMLMediaElement::enterFullscreen() |
| 3144 { |
| 3145 WTF_LOG(Media, "HTMLMediaElement::enterFullscreen(%p)", this); |
| 3146 |
| 3147 Fullscreen::from(document()).requestFullscreen(*this, Fullscreen::PrefixedVi
deoRequest); |
| 3148 } |
| 3149 |
| 3150 void HTMLMediaElement::exitFullscreen() |
| 3151 { |
| 3152 WTF_LOG(Media, "HTMLMediaElement::exitFullscreen(%p)", this); |
| 3153 |
| 3154 Fullscreen::from(document()).exitFullscreen(); |
| 3155 } |
| 3156 |
3143 void HTMLMediaElement::didBecomeFullscreenElement() | 3157 void HTMLMediaElement::didBecomeFullscreenElement() |
3144 { | 3158 { |
3145 if (mediaControls()) | 3159 if (mediaControls()) |
3146 mediaControls()->enteredFullscreen(); | 3160 mediaControls()->enteredFullscreen(); |
3147 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isHTMLVideoEl
ement()) | 3161 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isHTMLVideoEl
ement()) |
3148 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi
tingUpdateRebuildTree); | 3162 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi
tingUpdateRebuildTree); |
3149 } | 3163 } |
3150 | 3164 |
3151 void HTMLMediaElement::willStopBeingFullscreenElement() | 3165 void HTMLMediaElement::willStopBeingFullscreenElement() |
3152 { | 3166 { |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3660 | 3674 |
3661 #if ENABLE(WEB_AUDIO) | 3675 #if ENABLE(WEB_AUDIO) |
3662 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) | 3676 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) |
3663 { | 3677 { |
3664 if (!Heap::isHeapObjectAlive(m_audioSourceNode) && audioSourceProvider()) | 3678 if (!Heap::isHeapObjectAlive(m_audioSourceNode) && audioSourceProvider()) |
3665 audioSourceProvider()->setClient(nullptr); | 3679 audioSourceProvider()->setClient(nullptr); |
3666 } | 3680 } |
3667 #endif | 3681 #endif |
3668 | 3682 |
3669 } | 3683 } |
OLD | NEW |