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

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

Issue 2654083006: Revert of Sync requestFullscreen() and exitFullscreen() algorithms with the spec (Closed)
Patch Set: add failing test expectations Created 3 years, 10 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
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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 void VRDisplay::onFullscreenCheck(TimerBase*) { 703 void VRDisplay::onFullscreenCheck(TimerBase*) {
704 if (!m_isPresenting) { 704 if (!m_isPresenting) {
705 m_fullscreenCheckTimer.stop(); 705 m_fullscreenCheckTimer.stop();
706 return; 706 return;
707 } 707 }
708 // TODO: This is a temporary measure to track if fullscreen mode has been 708 // TODO: This is a temporary measure to track if fullscreen mode has been
709 // exited by the UA. If so we need to end VR presentation. Soon we won't 709 // exited by the UA. If so we need to end VR presentation. Soon we won't
710 // depend on the Fullscreen API to fake VR presentation, so this will 710 // depend on the Fullscreen API to fake VR presentation, so this will
711 // become unnessecary. Until that point, though, this seems preferable to 711 // become unnessecary. Until that point, though, this seems preferable to
712 // adding a bunch of notification plumbing to Fullscreen. 712 // adding a bunch of notification plumbing to Fullscreen.
713 if (!Fullscreen::isFullscreenElement(*m_layer.source())) { 713 if (!Fullscreen::isCurrentFullScreenElement(*m_layer.source())) {
714 // TODO(mthiesse): Due to asynchronous resizing, we might get kicked out of 714 // TODO(mthiesse): Due to asynchronous resizing, we might get kicked out of
715 // fullscreen when changing display parameters upon entering WebVR. So one 715 // fullscreen when changing display parameters upon entering WebVR. So one
716 // time only, we reenter fullscreen after having left it; otherwise we exit 716 // time only, we reenter fullscreen after having left it; otherwise we exit
717 // presentation. 717 // presentation.
718 if (m_reenteredFullscreen) { 718 if (m_reenteredFullscreen) {
719 m_isPresenting = false; 719 m_isPresenting = false;
720 OnPresentChange(); 720 OnPresentChange();
721 m_fullscreenCheckTimer.stop(); 721 m_fullscreenCheckTimer.stop();
722 if (m_display) 722 if (m_display)
723 m_display->ExitPresent(); 723 m_display->ExitPresent();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 visitor->trace(m_stageParameters); 775 visitor->trace(m_stageParameters);
776 visitor->trace(m_eyeParametersLeft); 776 visitor->trace(m_eyeParametersLeft);
777 visitor->trace(m_eyeParametersRight); 777 visitor->trace(m_eyeParametersRight);
778 visitor->trace(m_layer); 778 visitor->trace(m_layer);
779 visitor->trace(m_renderingContext); 779 visitor->trace(m_renderingContext);
780 visitor->trace(m_scriptedAnimationController); 780 visitor->trace(m_scriptedAnimationController);
781 visitor->trace(m_pendingPresentResolvers); 781 visitor->trace(m_pendingPresentResolvers);
782 } 782 }
783 783
784 } // namespace blink 784 } // 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