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

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

Issue 2361533003: Expose secure origin state to WebVR renderer (Closed)
Patch Set: Rebase Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRController.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698