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 "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/defaults.h" | 9 #include "chrome/browser/defaults.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MENU, true); | 827 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MENU, true); |
828 command_updater_.UpdateCommandEnabled(IDC_ZOOM_PLUS, true); | 828 command_updater_.UpdateCommandEnabled(IDC_ZOOM_PLUS, true); |
829 command_updater_.UpdateCommandEnabled(IDC_ZOOM_NORMAL, true); | 829 command_updater_.UpdateCommandEnabled(IDC_ZOOM_NORMAL, true); |
830 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MINUS, true); | 830 command_updater_.UpdateCommandEnabled(IDC_ZOOM_MINUS, true); |
831 | 831 |
832 // Show various bits of UI | 832 // Show various bits of UI |
833 UpdateOpenFileState(); | 833 UpdateOpenFileState(); |
834 command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false); | 834 command_updater_.UpdateCommandEnabled(IDC_CREATE_SHORTCUTS, false); |
835 UpdateCommandsForDevTools(); | 835 UpdateCommandsForDevTools(); |
836 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, CanOpenTaskManager()); | 836 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, CanOpenTaskManager()); |
837 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, true); | 837 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, |
| 838 !Profile::IsGuestSession()); |
838 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); | 839 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); |
839 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_KEYBOARD, true); | 840 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_KEYBOARD, true); |
840 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_MENU, true); | 841 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_MENU, true); |
841 command_updater_.UpdateCommandEnabled(IDC_BOOKMARKS_MENU, true); | 842 command_updater_.UpdateCommandEnabled(IDC_BOOKMARKS_MENU, true); |
842 | 843 |
843 command_updater_.UpdateCommandEnabled( | 844 command_updater_.UpdateCommandEnabled( |
844 IDC_SHOW_SYNC_SETUP, profile()->GetOriginalProfile()->IsSyncAccessible()); | 845 IDC_SHOW_SYNC_SETUP, profile()->GetOriginalProfile()->IsSyncAccessible()); |
845 | 846 |
846 // Initialize other commands based on the window type. | 847 // Initialize other commands based on the window type. |
847 bool normal_window = browser_->is_type_tabbed(); | 848 bool normal_window = browser_->is_type_tabbed(); |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 | 1166 |
1166 BrowserWindow* BrowserCommandController::window() { | 1167 BrowserWindow* BrowserCommandController::window() { |
1167 return browser_->window(); | 1168 return browser_->window(); |
1168 } | 1169 } |
1169 | 1170 |
1170 Profile* BrowserCommandController::profile() { | 1171 Profile* BrowserCommandController::profile() { |
1171 return browser_->profile(); | 1172 return browser_->profile(); |
1172 } | 1173 } |
1173 | 1174 |
1174 } // namespace chrome | 1175 } // namespace chrome |
OLD | NEW |