diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-09 21:40:29 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-09 21:40:29 +0000 |
commit | 96e34671ec5233dac8398a6f32c9b0648a134f30 (patch) | |
tree | 5e59006762e81de4eea194909b76a9cd77fb98a8 /chrome | |
parent | 41c8a1d8e0584841057b7a2c7d07caaec1c4a0d9 (diff) | |
download | chromium_src-96e34671ec5233dac8398a6f32c9b0648a134f30.zip chromium_src-96e34671ec5233dac8398a6f32c9b0648a134f30.tar.gz chromium_src-96e34671ec5233dac8398a6f32c9b0648a134f30.tar.bz2 |
Add back disabled menu items
Bug=chromiumos:1275
Test=There should be no "Create Application Shortcuts" menu item.
All others should be the same as Chrome, except that Print...
should be disabled. This is true for both the page menu and the
content area menu.
Review URL: http://codereview.chromium.org/596014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser.cc | 7 | ||||
-rw-r--r-- | chrome/browser/page_menu_model.cc | 4 | ||||
-rw-r--r-- | chrome/browser/tab_contents/render_view_context_menu.cc | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 19580d7..a8e222b 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -2517,9 +2517,6 @@ void Browser::InitCommandState() { command_updater_.UpdateCommandEnabled(IDC_FULLSCREEN, true); #endif command_updater_.UpdateCommandEnabled(IDC_EXIT, true); -#if defined(OS_CHROMEOS) - command_updater_.UpdateCommandEnabled(IDC_COMPACT_NAVBAR, true); -#endif // Page-related commands command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); @@ -2594,6 +2591,10 @@ void Browser::InitCommandState() { command_updater_.UpdateCommandEnabled(IDC_HELP_PAGE, true); command_updater_.UpdateCommandEnabled(IDC_IMPORT_SETTINGS, true); +#if defined(OS_CHROMEOS) + command_updater_.UpdateCommandEnabled(IDC_COMPACT_NAVBAR, true); + command_updater_.UpdateCommandEnabled(IDC_PRINT, false); +#endif ExtensionsService* extensions_service = profile()->GetExtensionsService(); bool enable_extensions = extensions_service && extensions_service->extensions_enabled(); diff --git a/chrome/browser/page_menu_model.cc b/chrome/browser/page_menu_model.cc index e66c41b..39836c0 100644 --- a/chrome/browser/page_menu_model.cc +++ b/chrome/browser/page_menu_model.cc @@ -29,10 +29,8 @@ void PageMenuModel::Build() { AddItemWithStringId(IDC_PASTE, IDS_PASTE); AddSeparator(); AddItemWithStringId(IDC_FIND, IDS_FIND); -#if !defined(OS_CHROMEOS) AddItemWithStringId(IDC_SAVE_PAGE, IDS_SAVE_PAGE); AddItemWithStringId(IDC_PRINT, IDS_PRINT); -#endif AddSeparator(); zoom_menu_model_.reset(new ZoomMenuModel(delegate())); @@ -162,9 +160,7 @@ void PopupPageMenuModel::Build() { AddItemWithStringId(IDC_PASTE, IDS_PASTE); AddSeparator(); AddItemWithStringId(IDC_FIND, IDS_FIND); -#if !defined(OS_CHROMEOS) AddItemWithStringId(IDC_PRINT, IDS_PRINT); -#endif zoom_menu_model_.reset(new ZoomMenuModel(delegate())); AddSubMenuWithStringId(IDS_ZOOM_MENU, zoom_menu_model_.get()); diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc index 35768eb..43c6634 100644 --- a/chrome/browser/tab_contents/render_view_context_menu.cc +++ b/chrome/browser/tab_contents/render_view_context_menu.cc @@ -516,7 +516,9 @@ bool RenderViewContextMenu::IsItemCommandEnabled(int id) const { return !params_.misspelled_word.empty(); case IDS_CONTENT_CONTEXT_COPYIMAGE: +#if !defined(OS_CHROMEOS) case IDS_CONTENT_CONTEXT_PRINT: +#endif case IDS_CONTENT_CONTEXT_SEARCHWEBFOR: case IDS_CONTENT_CONTEXT_GOTOURL: case IDC_SPELLCHECK_SUGGESTION_0: |