OLD | NEW |
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/dom/DOMException.h" | 7 #include "core/dom/DOMException.h" |
8 #include "core/dom/Fullscreen.h" | 8 #include "core/dom/Fullscreen.h" |
9 #include "core/inspector/ConsoleMessage.h" | 9 #include "core/inspector/ConsoleMessage.h" |
10 #include "modules/vr/NavigatorVR.h" | 10 #include "modules/vr/NavigatorVR.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 return promise; | 163 return promise; |
164 } | 164 } |
165 | 165 |
166 m_layer = layers[0]; | 166 m_layer = layers[0]; |
167 | 167 |
168 if (m_layer.source()) { | 168 if (m_layer.source()) { |
169 if (!m_capabilities->hasExternalDisplay()) { | 169 if (!m_capabilities->hasExternalDisplay()) { |
170 // TODO: Need a proper VR compositor, but for the moment on mobile | 170 // TODO: Need a proper VR compositor, but for the moment on mobile |
171 // we'll just make the canvas fullscreen so that VrShell can pick it | 171 // we'll just make the canvas fullscreen so that VrShell can pick it |
172 // up through the standard (high latency) compositing path. | 172 // up through the standard (high latency) compositing path. |
173 Fullscreen::from(m_layer.source()->document()).requestFullscreen(*m_
layer.source(), Fullscreen::UnprefixedRequest); | 173 Fullscreen::requestFullscreen(*m_layer.source(), Fullscreen::Unprefi
xedRequest); |
174 | 174 |
175 m_isPresenting = true; | 175 m_isPresenting = true; |
176 | 176 |
177 resolver->resolve(); | 177 resolver->resolve(); |
178 | 178 |
179 m_navigatorVR->fireVRDisplayPresentChange(this); | 179 m_navigatorVR->fireVRDisplayPresentChange(this); |
180 | 180 |
181 // Check to see if the canvas is still the current fullscreen | 181 // Check to see if the canvas is still the current fullscreen |
182 // element once per second. | 182 // element once per second. |
183 m_fullscreenCheckTimer.startRepeating(1.0, BLINK_FROM_HERE); | 183 m_fullscreenCheckTimer.startRepeating(1.0, BLINK_FROM_HERE); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 visitor->trace(m_navigatorVR); | 302 visitor->trace(m_navigatorVR); |
303 visitor->trace(m_capabilities); | 303 visitor->trace(m_capabilities); |
304 visitor->trace(m_stageParameters); | 304 visitor->trace(m_stageParameters); |
305 visitor->trace(m_eyeParametersLeft); | 305 visitor->trace(m_eyeParametersLeft); |
306 visitor->trace(m_eyeParametersRight); | 306 visitor->trace(m_eyeParametersRight); |
307 visitor->trace(m_framePose); | 307 visitor->trace(m_framePose); |
308 visitor->trace(m_layer); | 308 visitor->trace(m_layer); |
309 } | 309 } |
310 | 310 |
311 } // namespace blink | 311 } // namespace blink |
OLD | NEW |