summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/download_item_mac.h
diff options
context:
space:
mode:
authorpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 23:02:08 +0000
committerpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 23:02:08 +0000
commit8358105e6826be9bbb7ef2a43671d596aa492ba6 (patch)
treef3aa6026df83d2ab8befec964f6abb3bb4bde9d6 /chrome/browser/cocoa/download_item_mac.h
parenta796793059916e64b9c45191c1945868f4bff2a5 (diff)
downloadchromium_src-8358105e6826be9bbb7ef2a43671d596aa492ba6.zip
chromium_src-8358105e6826be9bbb7ef2a43671d596aa492ba6.tar.gz
chromium_src-8358105e6826be9bbb7ef2a43671d596aa492ba6.tar.bz2
The Mac version of the download shelf from the original CL by thakis:
http://codereview.chromium.org/150216 Original description: Move download item to its own view and a xib, paving the way for a custom download item view. I didn't change the look of the download items yet. The context menu is now in the download item xib as well. BUG=14659,15098,14660 TEST=Download something. Everything should look like before (except for the smaller icon), but the context menu items should be disabled/enabled and checked/unchecked correctly. Review URL: http://codereview.chromium.org/149276 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20200 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/download_item_mac.h')
-rw-r--r--chrome/browser/cocoa/download_item_mac.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/chrome/browser/cocoa/download_item_mac.h b/chrome/browser/cocoa/download_item_mac.h
index 4af3d53..7f31c2a 100644
--- a/chrome/browser/cocoa/download_item_mac.h
+++ b/chrome/browser/cocoa/download_item_mac.h
@@ -12,19 +12,16 @@
#include "chrome/browser/download/download_manager.h"
class BaseDownloadItemModel;
-@class DownloadShelfController;
-@class DownloadShelfContextMenuBridge;
-
+@class DownloadItemController;
// A class that bridges the visible mac download items to chromium's
// download model.
class DownloadItemMac : DownloadItem::Observer {
public:
- // DownloadItemMac takes ownership of |download_item_model|.
- DownloadItemMac(BaseDownloadItemModel* download_item_model,
- NSRect frame,
- DownloadShelfController* parent);
+ // DownloadItemMac takes ownership of |download_model|.
+ DownloadItemMac(BaseDownloadItemModel* download_model,
+ DownloadItemController* controller);
// Destructor.
~DownloadItemMac();
@@ -33,15 +30,14 @@ class DownloadItemMac : DownloadItem::Observer {
virtual void OnDownloadUpdated(DownloadItem* download);
virtual void OnDownloadOpened(DownloadItem* download) { }
+ BaseDownloadItemModel* download_model() { return download_model_.get(); }
+
private:
// The download item model we represent.
scoped_ptr<BaseDownloadItemModel> download_model_;
- // Our parent view
- DownloadShelfController* parent_; // weak
-
- // Context menu
- scoped_nsobject<DownloadShelfContextMenuBridge> menu_;
+ // The objective-c controller object.
+ DownloadItemController* item_controller_; // weak, owns us.
};
#endif // CHROME_BROWSER_COCOA_DOWNLOAD_ITEM_MAC_H_