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

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

Issue 2735983004: Visually disable VR Shell back/forward buttons when no history is available (Closed)
Patch Set: Addressing closure compilation error 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
« no previous file with comments | « chrome/browser/resources/vr_shell/vr_shell_ui.js ('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_api.js
diff --git a/chrome/browser/resources/vr_shell/vr_shell_ui_api.js b/chrome/browser/resources/vr_shell/vr_shell_ui_api.js
index 30f50da1dbed737672bfa254fdc39aa253f201e1..f93a98ba208b8ab3cd9aff3d57c163d57072b0dc 100644
--- a/chrome/browser/resources/vr_shell/vr_shell_ui_api.js
+++ b/chrome/browser/resources/vr_shell/vr_shell_ui_api.js
@@ -627,6 +627,13 @@ api.NativeCommandHandler = class {
onRemoveTab(tab) {}
/**
+ * Set back/forward history buttons to enabled/disabled.
+ * @param {boolean} canGoBack
+ * @param {boolean} canGoForward
+ */
+ onSetHistoryButtonsEnabled(canGoBack, canGoForward) {}
+
+ /**
* This function is executed after command parsing completes.
*/
onCommandHandlerFinished() {}
@@ -673,6 +680,9 @@ api.NativeCommandHandler = class {
if ('removeTab' in dict) {
this.onRemoveTab(dict['removeTab']);
}
+ if ('canGoBack' in dict) {
+ this.onSetHistoryButtonsEnabled(dict['canGoBack'], dict['canGoForward']);
+ }
this.onCommandHandlerFinished()
}
« no previous file with comments | « chrome/browser/resources/vr_shell/vr_shell_ui.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698