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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 791 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, CanOpenTaskManager()); | 791 command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, CanOpenTaskManager()); |
| 792 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, !guest_session); | 792 command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, !guest_session); |
| 793 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); | 793 command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); |
| 794 command_updater_.UpdateCommandEnabled(IDC_HELP_MENU, true); | 794 command_updater_.UpdateCommandEnabled(IDC_HELP_MENU, true); |
| 795 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_KEYBOARD, true); | 795 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_KEYBOARD, true); |
| 796 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_MENU, true); | 796 command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE_VIA_MENU, true); |
| 797 command_updater_.UpdateCommandEnabled(IDC_BOOKMARKS_MENU, !guest_session); | 797 command_updater_.UpdateCommandEnabled(IDC_BOOKMARKS_MENU, !guest_session); |
| 798 command_updater_.UpdateCommandEnabled(IDC_RECENT_TABS_MENU, | 798 command_updater_.UpdateCommandEnabled(IDC_RECENT_TABS_MENU, |
| 799 !guest_session && | 799 !guest_session && |
| 800 !profile()->IsOffTheRecord()); | 800 !profile()->IsOffTheRecord()); |
| 801 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, normal_window); | 801 command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA, |
| 802 normal_window && !guest_session); | |
|
Peter Kasting
2017/04/18 01:58:13
Seems like maybe the old |normal_window| check was
tsergeant
2017/04/18 03:10:36
Yup, this makes sense: just checking !guest_sessio
| |
| 802 #if defined(OS_CHROMEOS) | 803 #if defined(OS_CHROMEOS) |
| 803 command_updater_.UpdateCommandEnabled(IDC_TAKE_SCREENSHOT, true); | 804 command_updater_.UpdateCommandEnabled(IDC_TAKE_SCREENSHOT, true); |
| 804 command_updater_.UpdateCommandEnabled(IDC_TOUCH_HUD_PROJECTION_TOGGLE, true); | 805 command_updater_.UpdateCommandEnabled(IDC_TOUCH_HUD_PROJECTION_TOGGLE, true); |
| 805 #else | 806 #else |
| 806 // Chrome OS uses the system tray menu to handle multi-profiles. | 807 // Chrome OS uses the system tray menu to handle multi-profiles. |
| 807 if (normal_window && (guest_session || !profile()->IsOffTheRecord())) { | 808 if (normal_window && (guest_session || !profile()->IsOffTheRecord())) { |
| 808 command_updater_.UpdateCommandEnabled(IDC_SHOW_AVATAR_MENU, true); | 809 command_updater_.UpdateCommandEnabled(IDC_SHOW_AVATAR_MENU, true); |
| 809 } | 810 } |
| 810 #endif | 811 #endif |
| 811 | 812 |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1149 | 1150 |
| 1150 BrowserWindow* BrowserCommandController::window() { | 1151 BrowserWindow* BrowserCommandController::window() { |
| 1151 return browser_->window(); | 1152 return browser_->window(); |
| 1152 } | 1153 } |
| 1153 | 1154 |
| 1154 Profile* BrowserCommandController::profile() { | 1155 Profile* BrowserCommandController::profile() { |
| 1155 return browser_->profile(); | 1156 return browser_->profile(); |
| 1156 } | 1157 } |
| 1157 | 1158 |
| 1158 } // namespace chrome | 1159 } // namespace chrome |
| OLD | NEW |