Index: chrome/browser/cocoa/download_shelf_controller.mm |
=================================================================== |
--- chrome/browser/cocoa/download_shelf_controller.mm (revision 21184) |
+++ chrome/browser/cocoa/download_shelf_controller.mm (working copy) |
@@ -177,9 +177,19 @@ |
} |
- (void)hide:(id)sender { |
- [self showDownloadShelf:NO]; |
+ // If |sender| isn't nil, then we're being closed from the UI by the user and |
+ // we need to tell our shelf implementation to close. Otherwise, we're being |
+ // closed programmatically by our shelf implementation. |
+ if (sender) |
+ bridge_->Close(); |
+ else |
+ [self showDownloadShelf:NO]; |
} |
+- (float)height { |
+ return shelfHeight_; |
+} |
+ |
- (void)addDownloadItem:(BaseDownloadItemModel*)model { |
// TODO(thakis): we need to delete these at some point. There's no explicit |
// mass delete on windows, figure out where they do it. |