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

Unified Diff: chrome/browser/ui/browser_command_controller.cc

Issue 2065283002: Add heuristics to limit showing of new backspace UI bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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 | « no previous file | chrome/browser/ui/browser_view_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_command_controller.cc
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 5d97b8ff461ae14572d5f7b648dc4b21dd149d89..d411bed3f4cd09cd76087b5bd160178993427501 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -321,21 +321,23 @@ void BrowserCommandController::ExecuteCommandWithDisposition(
switch (id) {
// Navigation commands
case IDC_BACKSPACE_BACK:
- if (!base::FeatureList::IsEnabled(kBackspaceGoesBackFeature)) {
- browser_->window()->ShowNewBackShortcutBubble(false);
- break;
- }
- // FALL THROUGH
+ if (base::FeatureList::IsEnabled(kBackspaceGoesBackFeature))
+ GoBack(browser_, disposition);
+ else
+ browser_->window()->MaybeShowNewBackShortcutBubble(false);
+ break;
case IDC_BACK:
+ browser_->window()->HideNewBackShortcutBubble();
GoBack(browser_, disposition);
break;
case IDC_BACKSPACE_FORWARD:
- if (!base::FeatureList::IsEnabled(kBackspaceGoesBackFeature)) {
- browser_->window()->ShowNewBackShortcutBubble(true);
- break;
- }
- // FALL THROUGH
+ if (base::FeatureList::IsEnabled(kBackspaceGoesBackFeature))
+ GoForward(browser_, disposition);
+ else
+ browser_->window()->MaybeShowNewBackShortcutBubble(true);
+ break;
case IDC_FORWARD:
+ browser_->window()->HideNewBackShortcutBubble();
GoForward(browser_, disposition);
break;
case IDC_RELOAD:
« no previous file with comments | « no previous file | chrome/browser/ui/browser_view_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698