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

Side by Side Diff: third_party/WebKit/Source/modules/vr/VRDisplay.cpp

Issue 2573773002: Sync requestFullscreen() and exitFullscreen() algorithms with the spec (Closed)
Patch Set: address feedback Created 4 years 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/vr/VRDisplay.h" 5 #include "modules/vr/VRDisplay.h"
6 6
7 #include "core/css/StylePropertySet.h" 7 #include "core/css/StylePropertySet.h"
8 #include "core/dom/DOMException.h" 8 #include "core/dom/DOMException.h"
9 #include "core/dom/DocumentUserGestureToken.h" 9 #include "core/dom/DocumentUserGestureToken.h"
10 #include "core/dom/FrameRequestCallback.h" 10 #include "core/dom/FrameRequestCallback.h"
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 void VRDisplay::onFullscreenCheck(TimerBase*) { 695 void VRDisplay::onFullscreenCheck(TimerBase*) {
696 if (!m_isPresenting) { 696 if (!m_isPresenting) {
697 m_fullscreenCheckTimer.stop(); 697 m_fullscreenCheckTimer.stop();
698 return; 698 return;
699 } 699 }
700 // TODO: This is a temporary measure to track if fullscreen mode has been 700 // TODO: This is a temporary measure to track if fullscreen mode has been
701 // exited by the UA. If so we need to end VR presentation. Soon we won't 701 // exited by the UA. If so we need to end VR presentation. Soon we won't
702 // depend on the Fullscreen API to fake VR presentation, so this will 702 // depend on the Fullscreen API to fake VR presentation, so this will
703 // become unnessecary. Until that point, though, this seems preferable to 703 // become unnessecary. Until that point, though, this seems preferable to
704 // adding a bunch of notification plumbing to Fullscreen. 704 // adding a bunch of notification plumbing to Fullscreen.
705 if (!Fullscreen::isCurrentFullScreenElement(*m_layer.source())) { 705 if (!Fullscreen::isFullscreenElement(*m_layer.source())) {
706 // TODO(mthiesse): Due to asynchronous resizing, we might get kicked out of 706 // TODO(mthiesse): Due to asynchronous resizing, we might get kicked out of
707 // fullscreen when changing display parameters upon entering WebVR. So one 707 // fullscreen when changing display parameters upon entering WebVR. So one
708 // time only, we reenter fullscreen after having left it; otherwise we exit 708 // time only, we reenter fullscreen after having left it; otherwise we exit
709 // presentation. 709 // presentation.
710 if (m_reenteredFullscreen) { 710 if (m_reenteredFullscreen) {
711 m_isPresenting = false; 711 m_isPresenting = false;
712 OnPresentChange(); 712 OnPresentChange();
713 m_fullscreenCheckTimer.stop(); 713 m_fullscreenCheckTimer.stop();
714 if (m_display) 714 if (m_display)
715 m_display->ExitPresent(); 715 m_display->ExitPresent();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 visitor->trace(m_stageParameters); 766 visitor->trace(m_stageParameters);
767 visitor->trace(m_eyeParametersLeft); 767 visitor->trace(m_eyeParametersLeft);
768 visitor->trace(m_eyeParametersRight); 768 visitor->trace(m_eyeParametersRight);
769 visitor->trace(m_layer); 769 visitor->trace(m_layer);
770 visitor->trace(m_renderingContext); 770 visitor->trace(m_renderingContext);
771 visitor->trace(m_scriptedAnimationController); 771 visitor->trace(m_scriptedAnimationController);
772 visitor->trace(m_pendingPresentResolvers); 772 visitor->trace(m_pendingPresentResolvers);
773 } 773 }
774 774
775 } // namespace blink 775 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/ChromeClient.h ('k') | third_party/WebKit/Source/web/ChromeClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698