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 "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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 command_updater_.UpdateCommandEnabled(IDC_ENCODING_MENU, | 1104 command_updater_.UpdateCommandEnabled(IDC_ENCODING_MENU, |
1105 !is_chrome_internal && current_web_contents->IsSavable()); | 1105 !is_chrome_internal && current_web_contents->IsSavable()); |
1106 | 1106 |
1107 // Show various bits of UI | 1107 // Show various bits of UI |
1108 // TODO(pinkerton): Disable app-mode in the model until we implement it | 1108 // TODO(pinkerton): Disable app-mode in the model until we implement it |
1109 // on the Mac. Be sure to remove both ifdefs. http://crbug.com/13148 | 1109 // on the Mac. Be sure to remove both ifdefs. http://crbug.com/13148 |
1110 #if !defined(OS_MACOSX) | 1110 #if !defined(OS_MACOSX) |
1111 command_updater_.UpdateCommandEnabled( | 1111 command_updater_.UpdateCommandEnabled( |
1112 IDC_CREATE_SHORTCUTS, | 1112 IDC_CREATE_SHORTCUTS, |
1113 CanCreateApplicationShortcuts(browser_)); | 1113 CanCreateApplicationShortcuts(browser_)); |
| 1114 #endif |
1114 command_updater_.UpdateCommandEnabled(IDC_CREATE_HOSTED_APP, | 1115 command_updater_.UpdateCommandEnabled(IDC_CREATE_HOSTED_APP, |
1115 CanCreateBookmarkApp(browser_)); | 1116 CanCreateBookmarkApp(browser_)); |
1116 #endif | |
1117 | 1117 |
1118 command_updater_.UpdateCommandEnabled( | 1118 command_updater_.UpdateCommandEnabled( |
1119 IDC_TOGGLE_REQUEST_TABLET_SITE, | 1119 IDC_TOGGLE_REQUEST_TABLET_SITE, |
1120 CanRequestTabletSite(current_web_contents)); | 1120 CanRequestTabletSite(current_web_contents)); |
1121 | 1121 |
1122 UpdateCommandsForContentRestrictionState(); | 1122 UpdateCommandsForContentRestrictionState(); |
1123 UpdateCommandsForBookmarkEditing(); | 1123 UpdateCommandsForBookmarkEditing(); |
1124 UpdateCommandsForFind(); | 1124 UpdateCommandsForFind(); |
1125 // Update the zoom commands when an active tab is selected. | 1125 // Update the zoom commands when an active tab is selected. |
1126 UpdateCommandsForZoomState(); | 1126 UpdateCommandsForZoomState(); |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1342 | 1342 |
1343 BrowserWindow* BrowserCommandController::window() { | 1343 BrowserWindow* BrowserCommandController::window() { |
1344 return browser_->window(); | 1344 return browser_->window(); |
1345 } | 1345 } |
1346 | 1346 |
1347 Profile* BrowserCommandController::profile() { | 1347 Profile* BrowserCommandController::profile() { |
1348 return browser_->profile(); | 1348 return browser_->profile(); |
1349 } | 1349 } |
1350 | 1350 |
1351 } // namespace chrome | 1351 } // namespace chrome |
OLD | NEW |