| 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/frame/UseCounter.h" | 9 #include "core/frame/UseCounter.h" |
| 10 #include "core/inspector/ConsoleMessage.h" | 10 #include "core/inspector/ConsoleMessage.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 // we'll just make the canvas fullscreen so that VrShell can pick it | 224 // we'll just make the canvas fullscreen so that VrShell can pick it |
| 225 // up through the standard (high latency) compositing path. | 225 // up through the standard (high latency) compositing path. |
| 226 Fullscreen::requestFullscreen(*m_layer.source(), Fullscreen::UnprefixedR
equest); | 226 Fullscreen::requestFullscreen(*m_layer.source(), Fullscreen::UnprefixedR
equest); |
| 227 | 227 |
| 228 // Check to see if the canvas is still the current fullscreen | 228 // Check to see if the canvas is still the current fullscreen |
| 229 // element once per second. | 229 // element once per second. |
| 230 m_fullscreenCheckTimer.startRepeating(1.0, BLINK_FROM_HERE); | 230 m_fullscreenCheckTimer.startRepeating(1.0, BLINK_FROM_HERE); |
| 231 } | 231 } |
| 232 | 232 |
| 233 if (firstPresent) { | 233 if (firstPresent) { |
| 234 controller()->requestPresent(resolver, m_displayId); | 234 bool secureContext = scriptState->getExecutionContext()->isSecureContext
(); |
| 235 controller()->requestPresent(resolver, m_displayId, secureContext); |
| 235 } else { | 236 } else { |
| 236 updateLayerBounds(); | 237 updateLayerBounds(); |
| 237 resolver->resolve(); | 238 resolver->resolve(); |
| 238 } | 239 } |
| 239 | 240 |
| 240 return promise; | 241 return promise; |
| 241 } | 242 } |
| 242 | 243 |
| 243 ScriptPromise VRDisplay::exitPresent(ScriptState* scriptState) | 244 ScriptPromise VRDisplay::exitPresent(ScriptState* scriptState) |
| 244 { | 245 { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 { | 369 { |
| 369 visitor->trace(m_navigatorVR); | 370 visitor->trace(m_navigatorVR); |
| 370 visitor->trace(m_capabilities); | 371 visitor->trace(m_capabilities); |
| 371 visitor->trace(m_stageParameters); | 372 visitor->trace(m_stageParameters); |
| 372 visitor->trace(m_eyeParametersLeft); | 373 visitor->trace(m_eyeParametersLeft); |
| 373 visitor->trace(m_eyeParametersRight); | 374 visitor->trace(m_eyeParametersRight); |
| 374 visitor->trace(m_layer); | 375 visitor->trace(m_layer); |
| 375 } | 376 } |
| 376 | 377 |
| 377 } // namespace blink | 378 } // namespace blink |
| OLD | NEW |