summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/download_item_controller.mm
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-27 21:13:42 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-27 21:13:42 +0000
commit848364347bff182dbf8a0c2f22ed3ed5d65bca4e (patch)
treee79de6d570b32c486996e580d49c1a63209338b0 /chrome/browser/cocoa/download_item_controller.mm
parent80b7f1a8bfd97d4d8b268329932efba1d4f49567 (diff)
downloadchromium_src-848364347bff182dbf8a0c2f22ed3ed5d65bca4e.zip
chromium_src-848364347bff182dbf8a0c2f22ed3ed5d65bca4e.tar.gz
chromium_src-848364347bff182dbf8a0c2f22ed3ed5d65bca4e.tar.bz2
Remove completed downloads from shelf when the shelf closes.
BUG=15712 TEST=Download a few things, close shelf, download something else, note initial few things are no longer on the shelf. Special cases: * Dangerous downloads still awaiting affirmation should never be removed, no matter if they are completed or not. * Cancelled downloads should be removed. * In-progress downloads should not be removed. Review URL: http://codereview.chromium.org/173186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24663 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/download_item_controller.mm')
-rw-r--r--chrome/browser/cocoa/download_item_controller.mm4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/download_item_controller.mm b/chrome/browser/cocoa/download_item_controller.mm
index fd40a6a..7058a2a 100644
--- a/chrome/browser/cocoa/download_item_controller.mm
+++ b/chrome/browser/cocoa/download_item_controller.mm
@@ -137,6 +137,10 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
return [dangerousDownloadView_ frame].size;
}
+- (DownloadItem*)download {
+ return bridge_->download_model()->download();
+}
+
- (void)clearDangerousMode {
[self setState:kNormal];
}