| 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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 case IDC_SHOW_BOOKMARK_MANAGER: | 562 case IDC_SHOW_BOOKMARK_MANAGER: |
| 563 ShowBookmarkManager(browser_); | 563 ShowBookmarkManager(browser_); |
| 564 break; | 564 break; |
| 565 case IDC_SHOW_APP_MENU: | 565 case IDC_SHOW_APP_MENU: |
| 566 content::RecordAction(base::UserMetricsAction("Accel_Show_App_Menu")); | 566 content::RecordAction(base::UserMetricsAction("Accel_Show_App_Menu")); |
| 567 ShowAppMenu(browser_); | 567 ShowAppMenu(browser_); |
| 568 break; | 568 break; |
| 569 case IDC_SHOW_AVATAR_MENU: | 569 case IDC_SHOW_AVATAR_MENU: |
| 570 ShowAvatarMenu(browser_); | 570 ShowAvatarMenu(browser_); |
| 571 break; | 571 break; |
| 572 case IDC_SHOW_FAST_USER_SWITCHER: | |
| 573 ShowFastUserSwitcher(browser_); | |
| 574 break; | |
| 575 case IDC_SHOW_HISTORY: | 572 case IDC_SHOW_HISTORY: |
| 576 ShowHistory(browser_); | 573 ShowHistory(browser_); |
| 577 break; | 574 break; |
| 578 case IDC_SHOW_DOWNLOADS: | 575 case IDC_SHOW_DOWNLOADS: |
| 579 ShowDownloads(browser_); | 576 ShowDownloads(browser_); |
| 580 break; | 577 break; |
| 581 case IDC_MANAGE_EXTENSIONS: | 578 case IDC_MANAGE_EXTENSIONS: |
| 582 ShowExtensions(browser_, std::string()); | 579 ShowExtensions(browser_, std::string()); |
| 583 break; | 580 break; |
| 584 case IDC_OPTIONS: | 581 case IDC_OPTIONS: |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 !guest_session && | 790 !guest_session && |
| 794 !profile()->IsOffTheRecord()); | 791 !profile()->IsOffTheRecord()); |
| 795 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, normal_window); | 792 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, normal_window); |
| 796 #if defined(OS_CHROMEOS) | 793 #if defined(OS_CHROMEOS) |
| 797 command_updater_.UpdateCommandEnabled(IDC_TAKE_SCREENSHOT, true); | 794 command_updater_.UpdateCommandEnabled(IDC_TAKE_SCREENSHOT, true); |
| 798 command_updater_.UpdateCommandEnabled(IDC_TOUCH_HUD_PROJECTION_TOGGLE, true); | 795 command_updater_.UpdateCommandEnabled(IDC_TOUCH_HUD_PROJECTION_TOGGLE, true); |
| 799 #else | 796 #else |
| 800 // Chrome OS uses the system tray menu to handle multi-profiles. | 797 // Chrome OS uses the system tray menu to handle multi-profiles. |
| 801 if (normal_window && (guest_session || !profile()->IsOffTheRecord())) { | 798 if (normal_window && (guest_session || !profile()->IsOffTheRecord())) { |
| 802 command_updater_.UpdateCommandEnabled(IDC_SHOW_AVATAR_MENU, true); | 799 command_updater_.UpdateCommandEnabled(IDC_SHOW_AVATAR_MENU, true); |
| 803 command_updater_.UpdateCommandEnabled(IDC_SHOW_FAST_USER_SWITCHER, true); | |
| 804 } | 800 } |
| 805 #endif | 801 #endif |
| 806 | 802 |
| 807 UpdateShowSyncState(true); | 803 UpdateShowSyncState(true); |
| 808 | 804 |
| 809 // Navigation commands | 805 // Navigation commands |
| 810 command_updater_.UpdateCommandEnabled( | 806 command_updater_.UpdateCommandEnabled( |
| 811 IDC_HOME, | 807 IDC_HOME, |
| 812 normal_window || | 808 normal_window || |
| 813 (extensions::util::IsNewBookmarkAppsEnabled() && browser_->is_app())); | 809 (extensions::util::IsNewBookmarkAppsEnabled() && browser_->is_app())); |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1161 | 1157 |
| 1162 BrowserWindow* BrowserCommandController::window() { | 1158 BrowserWindow* BrowserCommandController::window() { |
| 1163 return browser_->window(); | 1159 return browser_->window(); |
| 1164 } | 1160 } |
| 1165 | 1161 |
| 1166 Profile* BrowserCommandController::profile() { | 1162 Profile* BrowserCommandController::profile() { |
| 1167 return browser_->profile(); | 1163 return browser_->profile(); |
| 1168 } | 1164 } |
| 1169 | 1165 |
| 1170 } // namespace chrome | 1166 } // namespace chrome |
| OLD | NEW |