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

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

Issue 1011233002: Enable fast user switching in Win8/Ash mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + fix conflict Created 5 years, 9 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 | « chrome/app/chrome_command_ids.h ('k') | chrome/browser/ui/browser_commands.h » ('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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 case IDC_SHOW_BOOKMARK_MANAGER: 716 case IDC_SHOW_BOOKMARK_MANAGER:
717 ShowBookmarkManager(browser_); 717 ShowBookmarkManager(browser_);
718 break; 718 break;
719 case IDC_SHOW_APP_MENU: 719 case IDC_SHOW_APP_MENU:
720 content::RecordAction(base::UserMetricsAction("Accel_Show_App_Menu")); 720 content::RecordAction(base::UserMetricsAction("Accel_Show_App_Menu"));
721 ShowAppMenu(browser_); 721 ShowAppMenu(browser_);
722 break; 722 break;
723 case IDC_SHOW_AVATAR_MENU: 723 case IDC_SHOW_AVATAR_MENU:
724 ShowAvatarMenu(browser_); 724 ShowAvatarMenu(browser_);
725 break; 725 break;
726 case IDC_SHOW_FAST_USER_SWITCHER:
727 ShowFastUserSwitcher(browser_);
728 break;
726 case IDC_SHOW_HISTORY: 729 case IDC_SHOW_HISTORY:
727 ShowHistory(browser_); 730 ShowHistory(browser_);
728 break; 731 break;
729 case IDC_SHOW_DOWNLOADS: 732 case IDC_SHOW_DOWNLOADS:
730 ShowDownloads(browser_); 733 ShowDownloads(browser_);
731 break; 734 break;
732 case IDC_MANAGE_EXTENSIONS: 735 case IDC_MANAGE_EXTENSIONS:
733 ShowExtensions(browser_, std::string()); 736 ShowExtensions(browser_, std::string());
734 break; 737 break;
735 case IDC_OPTIONS: 738 case IDC_OPTIONS:
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 command_updater_.UpdateCommandEnabled(IDC_BOOKMARKS_MENU, !guest_session); 972 command_updater_.UpdateCommandEnabled(IDC_BOOKMARKS_MENU, !guest_session);
970 command_updater_.UpdateCommandEnabled(IDC_RECENT_TABS_MENU, 973 command_updater_.UpdateCommandEnabled(IDC_RECENT_TABS_MENU,
971 !guest_session && 974 !guest_session &&
972 !profile()->IsOffTheRecord()); 975 !profile()->IsOffTheRecord());
973 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, normal_window); 976 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, normal_window);
974 #if defined(OS_CHROMEOS) 977 #if defined(OS_CHROMEOS)
975 command_updater_.UpdateCommandEnabled(IDC_TAKE_SCREENSHOT, true); 978 command_updater_.UpdateCommandEnabled(IDC_TAKE_SCREENSHOT, true);
976 command_updater_.UpdateCommandEnabled(IDC_TOUCH_HUD_PROJECTION_TOGGLE, true); 979 command_updater_.UpdateCommandEnabled(IDC_TOUCH_HUD_PROJECTION_TOGGLE, true);
977 #else 980 #else
978 // Chrome OS uses the system tray menu to handle multi-profiles. 981 // Chrome OS uses the system tray menu to handle multi-profiles.
979 if (normal_window && (guest_session || !profile()->IsOffTheRecord())) 982 if (normal_window && (guest_session || !profile()->IsOffTheRecord())) {
980 command_updater_.UpdateCommandEnabled(IDC_SHOW_AVATAR_MENU, true); 983 command_updater_.UpdateCommandEnabled(IDC_SHOW_AVATAR_MENU, true);
984 command_updater_.UpdateCommandEnabled(IDC_SHOW_FAST_USER_SWITCHER, true);
985 }
981 #endif 986 #endif
982 987
983 UpdateShowSyncState(true); 988 UpdateShowSyncState(true);
984 989
985 // Navigation commands 990 // Navigation commands
986 command_updater_.UpdateCommandEnabled( 991 command_updater_.UpdateCommandEnabled(
987 IDC_HOME, 992 IDC_HOME,
988 normal_window || 993 normal_window ||
989 (extensions::util::IsNewBookmarkAppsEnabled() && browser_->is_app())); 994 (extensions::util::IsNewBookmarkAppsEnabled() && browser_->is_app()));
990 995
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 1361
1357 BrowserWindow* BrowserCommandController::window() { 1362 BrowserWindow* BrowserCommandController::window() {
1358 return browser_->window(); 1363 return browser_->window();
1359 } 1364 }
1360 1365
1361 Profile* BrowserCommandController::profile() { 1366 Profile* BrowserCommandController::profile() {
1362 return browser_->profile(); 1367 return browser_->profile();
1363 } 1368 }
1364 1369
1365 } // namespace chrome 1370 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/app/chrome_command_ids.h ('k') | chrome/browser/ui/browser_commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698