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

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

Issue 2041293002: Add heuristics to limit showing of new backspace UI bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/browser_view_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 last_blocked_command_id_ = id; 314 last_blocked_command_id_ = id;
315 last_blocked_command_disposition_ = disposition; 315 last_blocked_command_disposition_ = disposition;
316 return; 316 return;
317 } 317 }
318 318
319 // The order of commands in this switch statement must match the function 319 // The order of commands in this switch statement must match the function
320 // declaration order in browser.h! 320 // declaration order in browser.h!
321 switch (id) { 321 switch (id) {
322 // Navigation commands 322 // Navigation commands
323 case IDC_BACKSPACE_BACK: 323 case IDC_BACKSPACE_BACK:
324 if (!base::FeatureList::IsEnabled(kBackspaceGoesBackFeature)) { 324 if (base::FeatureList::IsEnabled(kBackspaceGoesBackFeature))
325 browser_->window()->ShowNewBackShortcutBubble(false); 325 GoBack(browser_, disposition);
326 break; 326 else
327 } 327 browser_->window()->MaybeShowNewBackShortcutBubble(false);
328 // FALL THROUGH 328 break;
329 case IDC_BACK: 329 case IDC_BACK:
330 browser_->window()->HideNewBackShortcutBubble();
330 GoBack(browser_, disposition); 331 GoBack(browser_, disposition);
331 break; 332 break;
332 case IDC_BACKSPACE_FORWARD: 333 case IDC_BACKSPACE_FORWARD:
333 if (!base::FeatureList::IsEnabled(kBackspaceGoesBackFeature)) { 334 if (base::FeatureList::IsEnabled(kBackspaceGoesBackFeature))
334 browser_->window()->ShowNewBackShortcutBubble(true); 335 GoForward(browser_, disposition);
335 break; 336 else
336 } 337 browser_->window()->MaybeShowNewBackShortcutBubble(true);
337 // FALL THROUGH 338 break;
338 case IDC_FORWARD: 339 case IDC_FORWARD:
340 browser_->window()->HideNewBackShortcutBubble();
339 GoForward(browser_, disposition); 341 GoForward(browser_, disposition);
340 break; 342 break;
341 case IDC_RELOAD: 343 case IDC_RELOAD:
342 Reload(browser_, disposition); 344 Reload(browser_, disposition);
343 break; 345 break;
344 case IDC_RELOAD_CLEARING_CACHE: 346 case IDC_RELOAD_CLEARING_CACHE:
345 ClearCache(browser_); 347 ClearCache(browser_);
346 // FALL THROUGH 348 // FALL THROUGH
347 case IDC_RELOAD_BYPASSING_CACHE: 349 case IDC_RELOAD_BYPASSING_CACHE:
348 ReloadBypassingCache(browser_, disposition); 350 ReloadBypassingCache(browser_, disposition);
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 1274
1273 BrowserWindow* BrowserCommandController::window() { 1275 BrowserWindow* BrowserCommandController::window() {
1274 return browser_->window(); 1276 return browser_->window();
1275 } 1277 }
1276 1278
1277 Profile* BrowserCommandController::profile() { 1279 Profile* BrowserCommandController::profile() {
1278 return browser_->profile(); 1280 return browser_->profile();
1279 } 1281 }
1280 1282
1281 } // namespace chrome 1283 } // namespace chrome
OLDNEW
« 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