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

Side by Side Diff: chrome/browser/ui/browser_command_controller.cc

Issue 2540523003: Use standardized accelerator-to-shortcut code for new backspace shortcut UI. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser_command_controller.h" 5 #include "chrome/browser/ui/browser_command_controller.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 } 298 }
299 299
300 // The order of commands in this switch statement must match the function 300 // The order of commands in this switch statement must match the function
301 // declaration order in browser.h! 301 // declaration order in browser.h!
302 switch (id) { 302 switch (id) {
303 // Navigation commands 303 // Navigation commands
304 case IDC_BACKSPACE_BACK: 304 case IDC_BACKSPACE_BACK:
305 if (base::FeatureList::IsEnabled(features::kBackspaceGoesBackFeature)) 305 if (base::FeatureList::IsEnabled(features::kBackspaceGoesBackFeature))
306 GoBack(browser_, disposition); 306 GoBack(browser_, disposition);
307 else 307 else
308 browser_->window()->MaybeShowNewBackShortcutBubble(false); 308 browser_->window()->MaybeShowNewBackShortcutBubble(IDC_BACK);
309 break; 309 break;
310 case IDC_BACK: 310 case IDC_BACK:
311 browser_->window()->HideNewBackShortcutBubble(); 311 browser_->window()->HideNewBackShortcutBubble();
312 GoBack(browser_, disposition); 312 GoBack(browser_, disposition);
313 break; 313 break;
314 case IDC_BACKSPACE_FORWARD: 314 case IDC_BACKSPACE_FORWARD:
315 if (base::FeatureList::IsEnabled(features::kBackspaceGoesBackFeature)) 315 if (base::FeatureList::IsEnabled(features::kBackspaceGoesBackFeature))
316 GoForward(browser_, disposition); 316 GoForward(browser_, disposition);
317 else 317 else
318 browser_->window()->MaybeShowNewBackShortcutBubble(true); 318 browser_->window()->MaybeShowNewBackShortcutBubble(IDC_FORWARD);
319 break; 319 break;
320 case IDC_FORWARD: 320 case IDC_FORWARD:
321 browser_->window()->HideNewBackShortcutBubble(); 321 browser_->window()->HideNewBackShortcutBubble();
322 GoForward(browser_, disposition); 322 GoForward(browser_, disposition);
323 break; 323 break;
324 case IDC_RELOAD: 324 case IDC_RELOAD:
325 Reload(browser_, disposition); 325 Reload(browser_, disposition);
326 break; 326 break;
327 case IDC_RELOAD_CLEARING_CACHE: 327 case IDC_RELOAD_CLEARING_CACHE:
328 ClearCache(browser_); 328 ClearCache(browser_);
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 1174
1175 BrowserWindow* BrowserCommandController::window() { 1175 BrowserWindow* BrowserCommandController::window() {
1176 return browser_->window(); 1176 return browser_->window();
1177 } 1177 }
1178 1178
1179 Profile* BrowserCommandController::profile() { 1179 Profile* BrowserCommandController::profile() {
1180 return browser_->profile(); 1180 return browser_->profile();
1181 } 1181 }
1182 1182
1183 } // namespace chrome 1183 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698