Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2704)

Unified Diff: chrome/browser/cocoa/download_item_controller.mm

Issue 160444: add "remove" to download item context menu on mac (Closed)
Patch Set: remove "hidden" flag from new menu entry Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/download_item_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/download_item_controller.mm
diff --git a/chrome/browser/cocoa/download_item_controller.mm b/chrome/browser/cocoa/download_item_controller.mm
index 52ac1a17a71930642805bd01779cd3c9d7d4ae3d..fdbdd489930c7c5cd186b79e1f3e12147e108b4c 100644
--- a/chrome/browser/cocoa/download_item_controller.mm
+++ b/chrome/browser/cocoa/download_item_controller.mm
@@ -27,6 +27,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
using DownloadShelfContextMenu::OPEN_WHEN_COMPLETE;
using DownloadShelfContextMenu::ALWAYS_OPEN_TYPE;
using DownloadShelfContextMenu::CANCEL;
+ using DownloadShelfContextMenu::REMOVE_ITEM;
};
@@ -114,6 +115,8 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
actionId = DownloadShelfContextMenuMac::ALWAYS_OPEN_TYPE;
} else if (action == @selector(handleReveal:)) {
actionId = DownloadShelfContextMenuMac::SHOW_IN_FOLDER;
+ } else if (action == @selector(handleRemove:)) {
+ actionId = DownloadShelfContextMenuMac::REMOVE_ITEM;
} else if (action == @selector(handleCancel:)) {
actionId = DownloadShelfContextMenuMac::CANCEL;
} else {
@@ -143,6 +146,10 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
menuBridge_->ExecuteItemCommand(DownloadShelfContextMenuMac::SHOW_IN_FOLDER);
}
+- (IBAction)handleRemove:(id)sender {
+ menuBridge_->ExecuteItemCommand(DownloadShelfContextMenuMac::REMOVE_ITEM);
+}
+
- (IBAction)handleCancel:(id)sender {
menuBridge_->ExecuteItemCommand(DownloadShelfContextMenuMac::CANCEL);
}
« no previous file with comments | « chrome/browser/cocoa/download_item_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698