Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: chrome/browser/cocoa/download_item_controller.h

Issue 165295: Add "dangerous download" view on OS X, for now for dmg files. Also fix download item layout. (Closed)
Patch Set: Address comments Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/nibs/DownloadItem.xib ('k') | chrome/browser/cocoa/download_item_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/download_item_controller.h
diff --git a/chrome/browser/cocoa/download_item_controller.h b/chrome/browser/cocoa/download_item_controller.h
index 04b28d56657f0fc36a462c1d900d3d94fd663754..dd8d4e2c738853af4eae18d79e9e54059490168c 100644
--- a/chrome/browser/cocoa/download_item_controller.h
+++ b/chrome/browser/cocoa/download_item_controller.h
@@ -5,6 +5,7 @@
#import <Cocoa/Cocoa.h>
#include "base/scoped_ptr.h"
+#include "base/time.h"
class BaseDownloadItemModel;
@class DownloadItemCell;
@@ -24,16 +25,28 @@ class DownloadShelfContextMenuMac;
NSMenu* currentMenu_; // points to one of the two menus above
+ // This is shown instead of progressView_ for dangerous downloads.
+ IBOutlet NSView* dangerousDownloadView_;
+ IBOutlet NSTextField* dangerousDownloadLabel_;
+
scoped_ptr<DownloadItemMac> bridge_;
scoped_ptr<DownloadShelfContextMenuMac> menuBridge_;
// Weak pointer to the shelf that owns us.
DownloadShelfController* shelf_;
+
+ // The time at which this view was created.
+ base::Time creationTime_;
+
+ // The state of this item.
+ enum DownoadItemState {
+ kNormal,
+ kDangerous
+ } state_;
};
// Takes ownership of |downloadModel|.
-- (id)initWithFrame:(NSRect)frameRect
- model:(BaseDownloadItemModel*)downloadModel
+- (id)initWithModel:(BaseDownloadItemModel*)downloadModel
shelf:(DownloadShelfController*)shelf;
// Updates the UI and menu state from |downloadModel|.
@@ -52,6 +65,15 @@ class DownloadShelfContextMenuMac;
// Download item button clicked
- (IBAction)handleButtonClick:(id)sender;
+// Returns the size this item wants to have.
+- (NSSize)preferredSize;
+
+// Handling of dangerous downloads
+- (void)clearDangerousMode;
+- (BOOL)isDangerousMode;
+- (IBAction)saveDownload:(id)sender;
+- (IBAction)discardDownload:(id)sender;
+
// Context menu handlers.
- (IBAction)handleOpen:(id)sender;
- (IBAction)handleAlwaysOpen:(id)sender;
« no previous file with comments | « chrome/app/nibs/DownloadItem.xib ('k') | chrome/browser/cocoa/download_item_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698