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

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

Issue 2536223002: Omnibox improvements and fixes. (Closed)
Patch Set: Created 4 years, 1 month 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 99f017c8e5fc4b6c53557484b7daefbc572e55ce..46fd6ba1d6c884bc8d6d5943b51693890de5e91e 100644
--- a/chrome/browser/resources/vr_shell/vr_shell_ui.js
+++ b/chrome/browser/resources/vr_shell/vr_shell_ui.js
@@ -276,12 +276,10 @@ var vrShellUi = (function() {
class Omnibox {
constructor(contentQuadId) {
- /** @const */ var VISIBILITY_TIMEOUT_MS = 3000;
-
this.domUiElement = new DomUiElement('#omni-container');
this.enabled = false;
this.secure = false;
- this.visibilityTimeout = VISIBILITY_TIMEOUT_MS;
+ this.visibilityTimeout = 0;
this.visibilityTimer = null;
this.nativeState = {};
@@ -400,6 +398,8 @@ var vrShellUi = (function() {
}
setMode(mode) {
+ /** @const */ var OMNIBOX_VISIBILITY_TIMEOUT_MS = 5000;
+
this.mode = mode;
this.contentQuad.setEnabled(
mode == api.Mode.STANDARD || mode == api.Mode.CINEMA);
@@ -410,6 +410,9 @@ var vrShellUi = (function() {
mode == api.Mode.STANDARD || mode == api.Mode.CINEMA);
this.omnibox.setEnabled(
mode == api.Mode.STANDARD || mode == api.Mode.CINEMA);
+ this.omnibox.setVisibilityTimeout(
+ (mode == api.Mode.STANDARD || mode == api.Mode.CINEMA) ?
+ 0 : OMNIBOX_VISIBILITY_TIMEOUT_MS);
this.secureOriginWarnings.setEnabled(mode == api.Mode.WEB_VR);
}

Powered by Google App Engine
This is Rietveld 408576698