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

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

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

Powered by Google App Engine
This is Rietveld 408576698