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-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_controller.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_controller.h')
-rw-r--r--chrome/browser/cocoa/download_item_controller.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/download_item_controller.h b/chrome/browser/cocoa/download_item_controller.h
new file mode 100644
index 0000000..d55231d
--- /dev/null
+++ b/chrome/browser/cocoa/download_item_controller.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/scoped_ptr.h"
+
+class BaseDownloadItemModel;
+class DownloadItemMac;
+class DownloadShelfContextMenuMac;
+
+// A controller class that manages one download item.
+
+@interface DownloadItemController : NSViewController {
+ @private
+ IBOutlet NSPopUpButton* popupButton_;
+
+ IBOutlet NSMenu* activeDownloadMenu_;
+ IBOutlet NSMenu* completeDownloadMenu_;
+
+ scoped_ptr<DownloadItemMac> bridge_;
+ scoped_ptr<DownloadShelfContextMenuMac> menuBridge_;
+};
+
+// Takes ownership of |downloadModel|.
+- (id)initWithFrame:(NSRect)frameRect
+ model:(BaseDownloadItemModel*)downloadModel;
+
+// Updates the UI and menu state from |downloadModel|.
+- (void)setStateFromDownload:(BaseDownloadItemModel*)downloadModel;
+
+// Context menu handlers.
+- (IBAction)handleOpen:(id)sender;
+- (IBAction)handleAlwaysOpen:(id)sender;
+- (IBAction)handleReveal:(id)sender;
+- (IBAction)handleCancel:(id)sender;
+
+@end
+