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

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

Issue 2620383007: Tie VR omnibox to page load progress through TabObserver. (Closed)
Patch Set: Rebase to ToT. Created 3 years, 11 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
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 872c506870ee1eeef90bcf0953e3d0135deed56f..1d89db5762a6f840d7445d85b10ab67f92db8b27 100644
--- a/chrome/browser/resources/vr_shell/vr_shell_ui.js
+++ b/chrome/browser/resources/vr_shell/vr_shell_ui.js
@@ -294,7 +294,7 @@ var vrShellUi = (function() {
this.enabled = false;
this.hidden = false;
this.loading = false;
- this.loadingProgress = 0;
+ this.loadProgress = 0;
this.level = 0;
this.visibilityTimeout = 0;
this.visibilityTimer = null;
@@ -343,13 +343,13 @@ var vrShellUi = (function() {
setLoading(loading) {
this.loading = loading;
- this.loadingProgress = 0;
+ this.loadProgress = 0;
this.resetVisibilityTimer();
this.updateState();
}
- setLoadingProgress(progress) {
- this.loadingProgress = progress;
+ setLoadProgress(progress) {
+ this.loadProgress = progress;
this.updateState();
}
@@ -405,7 +405,7 @@ var vrShellUi = (function() {
if (this.loading) {
// Remap load progress range 0-100 as 5-95 percent, to avoid the
// extremities of the rounded ends of the omnibox.
- let percent = Math.round((this.loadingProgress * 0.9 + 0.05) * 100);
+ let percent = Math.round((this.loadProgress * 0.9 + 0.05) * 100);
let gradient = 'linear-gradient(to right, ' + this.statusBarColor +
' 0%, ' + this.statusBarColor + ' ' + percent + '%, ' +
this.backgroundColor + ' ' + percent + '%, ' +
@@ -531,8 +531,8 @@ var vrShellUi = (function() {
if ('loading' in dict) {
uiManager.omnibox.setLoading(dict['loading']);
}
- if ('loadingProgress' in dict) {
- uiManager.omnibox.setLoadingProgress(dict['loadingProgress']);
+ if ('loadProgress' in dict) {
+ uiManager.omnibox.setLoadProgress(dict['loadProgress']);
}
ui.flush();
}
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698