Commit a38ed643 authored by cjgrant's avatar cjgrant Committed by Commit bot

Make Omnibox stay visible during long page loads.

The omnibox visibility timer should not be active during a page load; it
should be started only after loading finishes.

BUG=641508
TEST=Viewed a page that takes 10s to load; omnibox stays visible.
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2534963002
Cr-Commit-Position: refs/heads/master@{#435007}
parent 33858433
......@@ -334,7 +334,7 @@ var vrShellUi = (function() {
clearInterval(this.visibilityTimer);
this.visibilityTimer = null;
}
if (this.enabled && this.visibilityTimeout > 0) {
if (this.enabled && this.visibilityTimeout > 0 && !this.loading) {
this.visibilityTimer = setTimeout(
this.onVisibilityTimer.bind(this), this.visibilityTimeout);
}
......@@ -364,11 +364,11 @@ var vrShellUi = (function() {
let state = 'idle';
this.visibleAfterTransition = true;
if (this.visibilityTimeout > 0 && !this.visibilityTimer) {
if (this.loading) {
state = 'loading';
} else if (this.visibilityTimeout > 0 && !this.visibilityTimer) {
state = 'hide';
this.visibleAfterTransition = false;
} else if (this.loading) {
state = 'loading';
}
document.querySelector('#omni').className = state;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment