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

Unified Diff: chrome/browser/resources/vr_shell/vr_shell_ui.js

Issue 2749703007: Add menu mode plumbing for WebVR mode. (Closed)
Patch Set: Rename JS WebVR rendering functions for clarity. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/vr_shell/vr_shell_ui.js
diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui.js b/chrome/browser/resources/vr_shell/vr_shell_ui.js
index 316a82e125897bbee60016a9b2cecbe0a2e43457..f01ace16594be68751d1a2aecf25d1a61ffa4a0e 100644
--- a/chrome/browser/resources/vr_shell/vr_shell_ui.js
+++ b/chrome/browser/resources/vr_shell/vr_shell_ui.js
@@ -101,14 +101,14 @@ var vrShellUi = (function() {
if (this.menuMode == enabled)
return;
this.menuMode = enabled;
- this.updateState()
+ this.updateState();
}
setFullscreen(enabled) {
if (this.fullscreen == enabled)
return;
this.fullscreen = enabled;
- this.updateState()
+ this.updateState();
}
updateState() {
@@ -1145,8 +1145,9 @@ var vrShellUi = (function() {
let fullscreen = this.fullscreen;
api.doAction(api.Action.SET_CONTENT_PAUSED, {'paused': menuMode});
+ ui.setWebVrRenderingModeEnabled(mode == api.Mode.WEB_VR && !menuMode);
- this.contentQuad.setEnabled(mode == api.Mode.STANDARD);
+ this.contentQuad.setEnabled(mode == api.Mode.STANDARD || menuMode);
this.contentQuad.setFullscreen(fullscreen);
this.contentQuad.setMenuMode(menuMode);
// TODO(crbug/643815): Set aspect ratio on content quad when available.
@@ -1162,11 +1163,12 @@ var vrShellUi = (function() {
this.secureOriginWarnings.setEnabled(
mode == api.Mode.WEB_VR && !menuMode);
this.background.setState(mode, menuMode, fullscreen);
- this.tabContainer.setEnabled(mode == api.Mode.STANDARD && menuMode);
+ this.tabContainer.setEnabled(menuMode);
this.reloadUiButton.setEnabled(mode == api.Mode.STANDARD);
this.keyboard.setEnabled(mode == api.Mode.STANDARD && menuMode);
+
api.setUiCssSize(
uiRootElement.clientWidth, uiRootElement.clientHeight, UI_DPR);
}
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('k') | chrome/browser/resources/vr_shell/vr_shell_ui_api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698