Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: Source/core/html/HTMLMediaElement.cpp

Issue 1058783006: Remove the allowfullscreen exemption for the video-specific fullscreen API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: consistent quotes Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/HTMLVideoElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2763 matching lines...) Expand 10 before | Expand all | Expand 10 after
2774 } 2774 }
2775 2775
2776 void HTMLMediaElement::mediaPlayerRequestFullscreen() 2776 void HTMLMediaElement::mediaPlayerRequestFullscreen()
2777 { 2777 {
2778 WTF_LOG(Media, "HTMLMediaElement::mediaPlayerRequestFullscreen(%p)", this); 2778 WTF_LOG(Media, "HTMLMediaElement::mediaPlayerRequestFullscreen(%p)", this);
2779 2779
2780 // The player is responsible for only invoking this callback in response to 2780 // The player is responsible for only invoking this callback in response to
2781 // user interaction or when it is technically required to play the video. 2781 // user interaction or when it is technically required to play the video.
2782 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); 2782 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
2783 2783
2784 enterFullscreen(); 2784 Fullscreen::from(document()).requestFullscreen(*this, Fullscreen::InternalVi deoRequest);
2785 } 2785 }
2786 2786
2787 void HTMLMediaElement::mediaPlayerRequestSeek(double time) 2787 void HTMLMediaElement::mediaPlayerRequestSeek(double time)
2788 { 2788 {
2789 // The player is the source of this seek request. 2789 // The player is the source of this seek request.
2790 if (m_mediaController) { 2790 if (m_mediaController) {
2791 m_mediaController->setCurrentTime(time); 2791 m_mediaController->setCurrentTime(time);
2792 return; 2792 return;
2793 } 2793 }
2794 setCurrentTime(time, ASSERT_NO_EXCEPTION); 2794 setCurrentTime(time, ASSERT_NO_EXCEPTION);
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
3132 m_mediaController->clearExecutionContext(); 3132 m_mediaController->clearExecutionContext();
3133 #endif 3133 #endif
3134 ActiveDOMObject::contextDestroyed(); 3134 ActiveDOMObject::contextDestroyed();
3135 } 3135 }
3136 3136
3137 bool HTMLMediaElement::isFullscreen() const 3137 bool HTMLMediaElement::isFullscreen() const
3138 { 3138 {
3139 return Fullscreen::isActiveFullScreenElement(*this); 3139 return Fullscreen::isActiveFullScreenElement(*this);
3140 } 3140 }
3141 3141
3142 void HTMLMediaElement::enterFullscreen()
3143 {
3144 WTF_LOG(Media, "HTMLMediaElement::enterFullscreen(%p)", this);
3145
3146 Fullscreen::from(document()).requestFullscreen(*this, Fullscreen::PrefixedVi deoRequest);
3147 }
3148
3149 void HTMLMediaElement::exitFullscreen()
3150 {
3151 WTF_LOG(Media, "HTMLMediaElement::exitFullscreen(%p)", this);
3152
3153 Fullscreen::from(document()).exitFullscreen();
3154 }
3155
3156 void HTMLMediaElement::didBecomeFullscreenElement() 3142 void HTMLMediaElement::didBecomeFullscreenElement()
3157 { 3143 {
3158 if (mediaControls()) 3144 if (mediaControls())
3159 mediaControls()->enteredFullscreen(); 3145 mediaControls()->enteredFullscreen();
3160 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isHTMLVideoEl ement()) 3146 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && isHTMLVideoEl ement())
3161 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree); 3147 document().layoutView()->compositor()->setNeedsCompositingUpdate(Composi tingUpdateRebuildTree);
3162 } 3148 }
3163 3149
3164 void HTMLMediaElement::willStopBeingFullscreenElement() 3150 void HTMLMediaElement::willStopBeingFullscreenElement()
3165 { 3151 {
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
3673 3659
3674 #if ENABLE(WEB_AUDIO) 3660 #if ENABLE(WEB_AUDIO)
3675 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3661 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3676 { 3662 {
3677 if (!visitor->isHeapObjectAlive(m_audioSourceNode) && audioSourceProvider()) 3663 if (!visitor->isHeapObjectAlive(m_audioSourceNode) && audioSourceProvider())
3678 audioSourceProvider()->setClient(nullptr); 3664 audioSourceProvider()->setClient(nullptr);
3679 } 3665 }
3680 #endif 3666 #endif
3681 3667
3682 } 3668 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/HTMLVideoElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698