Index: chrome/browser/browser.cc |
=================================================================== |
--- chrome/browser/browser.cc (revision 56008) |
+++ chrome/browser/browser.cc (working copy) |
@@ -1090,7 +1090,14 @@ |
// Show various bits of UI |
command_updater_.UpdateCommandEnabled(IDC_DEVELOPER_MENU, show_main_ui); |
command_updater_.UpdateCommandEnabled(IDC_REPORT_BUG, show_main_ui); |
+#if defined(OS_CHROMEOS) |
+ command_updater_.UpdateCommandEnabled( |
sky
2010/08/17 17:58:39
Slews of ifdefs like this make the code really har
Dmitry Polukhin
2010/08/18 08:37:51
I don't see "defaults::", I see only "browser_defa
|
+ IDC_SHOW_BOOKMARK_BAR, |
+ show_main_ui && !CommandLine::ForCurrentProcess()-> |
+ HasSwitch(switches::kDisableBookmarks)); |
+#else |
command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_BAR, show_main_ui); |
+#endif |
command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, show_main_ui); |
command_updater_.UpdateCommandEnabled(IDC_SYNC_BOOKMARKS, |
show_main_ui && profile_->IsSyncAccessible()); |
@@ -3241,7 +3248,14 @@ |
command_updater_.UpdateCommandEnabled(IDC_DEV_TOOLS_INSPECT, true); |
command_updater_.UpdateCommandEnabled(IDC_TASK_MANAGER, true); |
command_updater_.UpdateCommandEnabled(IDC_SHOW_HISTORY, true); |
+#if defined(OS_CHROMEOS) |
+ command_updater_.UpdateCommandEnabled( |
+ IDC_SHOW_BOOKMARK_MANAGER, |
+ !CommandLine::ForCurrentProcess()-> |
+ HasSwitch(switches::kDisableBookmarks)); |
+#else |
command_updater_.UpdateCommandEnabled(IDC_SHOW_BOOKMARK_MANAGER, true); |
+#endif |
command_updater_.UpdateCommandEnabled(IDC_SHOW_DOWNLOADS, true); |
command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE, true); |
command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, true); |
@@ -3287,7 +3301,14 @@ |
#endif |
// Page-related commands |
+#if defined(OS_CHROMEOS) |
+ command_updater_.UpdateCommandEnabled( |
+ IDC_BOOKMARK_PAGE, |
+ normal_window && !CommandLine::ForCurrentProcess()-> |
+ HasSwitch(switches::kDisableBookmarks)); |
+#else |
command_updater_.UpdateCommandEnabled(IDC_BOOKMARK_PAGE, normal_window); |
+#endif |
// Clipboard commands |
command_updater_.UpdateCommandEnabled(IDC_COPY_URL, non_devtools_window); |
@@ -3333,8 +3354,15 @@ |
// Page-related commands |
window_->SetStarredState(current_tab->is_starred()); |
+#if defined(OS_CHROMEOS) |
+ command_updater_.UpdateCommandEnabled( |
+ IDC_BOOKMARK_ALL_TABS, |
+ CanBookmarkAllTabs() && !CommandLine::ForCurrentProcess()-> |
+ HasSwitch(switches::kDisableBookmarks)); |
+#else |
command_updater_.UpdateCommandEnabled(IDC_BOOKMARK_ALL_TABS, |
CanBookmarkAllTabs()); |
+#endif |
command_updater_.UpdateCommandEnabled(IDC_VIEW_SOURCE, |
current_tab->controller().CanViewSource()); |
// Instead of using GetURL here, we use url() (which is the "real" url of the |