diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-25 21:52:52 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-25 21:52:52 +0000 |
commit | 546176cb659dcff9b31fb4dbee85ad24b0c8eec7 (patch) | |
tree | 804b570e25dfdf1c99c6bb96786a360b39a3f838 /chrome/browser/cocoa | |
parent | e9210915326b600a7efc8aa6d1befba549347fe5 (diff) | |
download | chromium_src-546176cb659dcff9b31fb4dbee85ad24b0c8eec7.zip chromium_src-546176cb659dcff9b31fb4dbee85ad24b0c8eec7.tar.gz chromium_src-546176cb659dcff9b31fb4dbee85ad24b0c8eec7.tar.bz2 |
Don't make pause/resume item in download context menu a check item (the name already toggles between pause and resume)
also, share more code between windows and linux. DownloadShelfContextMenu{Win,Linux} don't need to both implement menus::SimpleMenuModel::Delegate.
BUG=24759
TEST=download item context menu still works.
Review URL: http://codereview.chromium.org/652200
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40051 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r-- | chrome/browser/cocoa/download_item_controller.mm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/chrome/browser/cocoa/download_item_controller.mm b/chrome/browser/cocoa/download_item_controller.mm index 7b32994..f20c548 100644 --- a/chrome/browser/cocoa/download_item_controller.mm +++ b/chrome/browser/cocoa/download_item_controller.mm @@ -57,9 +57,9 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { DownloadShelfContextMenuMac(BaseDownloadItemModel* model) : DownloadShelfContextMenu(model) { } - using DownloadShelfContextMenu::ExecuteItemCommand; - using DownloadShelfContextMenu::ItemIsChecked; - using DownloadShelfContextMenu::IsItemCommandEnabled; + using DownloadShelfContextMenu::ExecuteCommand; + using DownloadShelfContextMenu::IsCommandIdChecked; + using DownloadShelfContextMenu::IsCommandIdEnabled; using DownloadShelfContextMenu::SHOW_IN_FOLDER; using DownloadShelfContextMenu::OPEN_WHEN_COMPLETE; @@ -297,30 +297,30 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { return YES; } - if (menuBridge_->ItemIsChecked(actionId)) + if (menuBridge_->IsCommandIdChecked(actionId)) [item setState:NSOnState]; else [item setState:NSOffState]; - return menuBridge_->IsItemCommandEnabled(actionId) ? YES : NO; + return menuBridge_->IsCommandIdEnabled(actionId) ? YES : NO; } - (IBAction)handleOpen:(id)sender { - menuBridge_->ExecuteItemCommand( + menuBridge_->ExecuteCommand( DownloadShelfContextMenuMac::OPEN_WHEN_COMPLETE); } - (IBAction)handleAlwaysOpen:(id)sender { - menuBridge_->ExecuteItemCommand( + menuBridge_->ExecuteCommand( DownloadShelfContextMenuMac::ALWAYS_OPEN_TYPE); } - (IBAction)handleReveal:(id)sender { - menuBridge_->ExecuteItemCommand(DownloadShelfContextMenuMac::SHOW_IN_FOLDER); + menuBridge_->ExecuteCommand(DownloadShelfContextMenuMac::SHOW_IN_FOLDER); } - (IBAction)handleCancel:(id)sender { - menuBridge_->ExecuteItemCommand(DownloadShelfContextMenuMac::CANCEL); + menuBridge_->ExecuteCommand(DownloadShelfContextMenuMac::CANCEL); } - (IBAction)handleTogglePause:(id)sender { @@ -331,7 +331,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { [sender setTitle:l10n_util::GetNSStringWithFixup( IDS_DOWNLOAD_MENU_RESUME_ITEM)]; } - menuBridge_->ExecuteItemCommand(DownloadShelfContextMenuMac::TOGGLE_PAUSE); + menuBridge_->ExecuteCommand(DownloadShelfContextMenuMac::TOGGLE_PAUSE); } @end |