summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/download_item_controller.h
diff options
context:
space:
mode:
authorpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 22:04:43 +0000
committerpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-16 22:04:43 +0000
commit44b4b0ccfdfc1ca2a8a56094d86a554b79f43ce7 (patch)
tree80eed9ac234d0025b259bd8fda1c2aca8327caf1 /chrome/browser/cocoa/download_item_controller.h
parent0443eaf9d4e7784521ce23f9c05e62ea2018ebe6 (diff)
downloadchromium_src-44b4b0ccfdfc1ca2a8a56094d86a554b79f43ce7.zip
chromium_src-44b4b0ccfdfc1ca2a8a56094d86a554b79f43ce7.tar.gz
chromium_src-44b4b0ccfdfc1ca2a8a56094d86a554b79f43ce7.tar.bz2
Fix for the Mac download shelf crash when clearing all downloads.
We also now automatically hide the shelf when the downloads are cleared. BUG=15855,15893 TEST=Download a few things, clear all downloads and the shelf will empty and hide. Review URL: http://codereview.chromium.org/149732 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20907 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/download_item_controller.h')
-rw-r--r--chrome/browser/cocoa/download_item_controller.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/download_item_controller.h b/chrome/browser/cocoa/download_item_controller.h
index d55231d..dec9f7c 100644
--- a/chrome/browser/cocoa/download_item_controller.h
+++ b/chrome/browser/cocoa/download_item_controller.h
@@ -9,6 +9,7 @@
class BaseDownloadItemModel;
class DownloadItemMac;
class DownloadShelfContextMenuMac;
+@class DownloadShelfController;
// A controller class that manages one download item.
@@ -21,15 +22,22 @@ class DownloadShelfContextMenuMac;
scoped_ptr<DownloadItemMac> bridge_;
scoped_ptr<DownloadShelfContextMenuMac> menuBridge_;
+
+ // Weak pointer to the shelf that owns us.
+ DownloadShelfController* shelf_;
};
// Takes ownership of |downloadModel|.
- (id)initWithFrame:(NSRect)frameRect
- model:(BaseDownloadItemModel*)downloadModel;
+ model:(BaseDownloadItemModel*)downloadModel
+ shelf:(DownloadShelfController*)shelf;
// Updates the UI and menu state from |downloadModel|.
- (void)setStateFromDownload:(BaseDownloadItemModel*)downloadModel;
+// Remove ourself from the download UI.
+- (void)remove;
+
// Context menu handlers.
- (IBAction)handleOpen:(id)sender;
- (IBAction)handleAlwaysOpen:(id)sender;