Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 301 last_blocked_command_id_ = id; | 301 last_blocked_command_id_ = id; |
| 302 last_blocked_command_disposition_ = disposition; | 302 last_blocked_command_disposition_ = disposition; |
| 303 return; | 303 return; |
| 304 } | 304 } |
| 305 | 305 |
| 306 // The order of commands in this switch statement must match the function | 306 // The order of commands in this switch statement must match the function |
| 307 // declaration order in browser.h! | 307 // declaration order in browser.h! |
| 308 switch (id) { | 308 switch (id) { |
| 309 // Navigation commands | 309 // Navigation commands |
| 310 case IDC_BACKSPACE_BACK: | 310 case IDC_BACKSPACE_BACK: |
| 311 if (base::FeatureList::IsEnabled(features::kBackspaceGoesBackFeature)) | 311 window()->MaybeShowNewBackShortcutBubble(false); |
| 312 GoBack(browser_, disposition); | |
|
michaelpg
2017/05/10 23:41:51
can remove chrome_features.h #include here, too
ojan
2017/05/11 00:53:28
done
| |
| 313 else | |
| 314 window()->MaybeShowNewBackShortcutBubble(false); | |
| 315 break; | 312 break; |
| 316 case IDC_BACK: | 313 case IDC_BACK: |
| 317 window()->HideNewBackShortcutBubble(); | 314 window()->HideNewBackShortcutBubble(); |
| 318 GoBack(browser_, disposition); | 315 GoBack(browser_, disposition); |
| 319 break; | 316 break; |
| 320 case IDC_BACKSPACE_FORWARD: | 317 case IDC_BACKSPACE_FORWARD: |
| 321 if (base::FeatureList::IsEnabled(features::kBackspaceGoesBackFeature)) | 318 window()->MaybeShowNewBackShortcutBubble(true); |
| 322 GoForward(browser_, disposition); | |
| 323 else | |
| 324 window()->MaybeShowNewBackShortcutBubble(true); | |
| 325 break; | 319 break; |
| 326 case IDC_FORWARD: | 320 case IDC_FORWARD: |
| 327 window()->HideNewBackShortcutBubble(); | 321 window()->HideNewBackShortcutBubble(); |
| 328 GoForward(browser_, disposition); | 322 GoForward(browser_, disposition); |
| 329 break; | 323 break; |
| 330 case IDC_RELOAD: | 324 case IDC_RELOAD: |
| 331 Reload(browser_, disposition); | 325 Reload(browser_, disposition); |
| 332 break; | 326 break; |
| 333 case IDC_RELOAD_CLEARING_CACHE: | 327 case IDC_RELOAD_CLEARING_CACHE: |
| 334 ClearCache(browser_); | 328 ClearCache(browser_); |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1150 | 1144 |
| 1151 BrowserWindow* BrowserCommandController::window() { | 1145 BrowserWindow* BrowserCommandController::window() { |
| 1152 return browser_->window(); | 1146 return browser_->window(); |
| 1153 } | 1147 } |
| 1154 | 1148 |
| 1155 Profile* BrowserCommandController::profile() { | 1149 Profile* BrowserCommandController::profile() { |
| 1156 return browser_->profile(); | 1150 return browser_->profile(); |
| 1157 } | 1151 } |
| 1158 | 1152 |
| 1159 } // namespace chrome | 1153 } // namespace chrome |
| OLD | NEW |