Index: chrome/browser/ui/cocoa/download/download_item_controller.h |
diff --git a/chrome/browser/ui/cocoa/download/download_item_controller.h b/chrome/browser/ui/cocoa/download/download_item_controller.h |
index e9373f3e583cd6aa3cb5beac9dcf5a980bc192a8..91fab101492d635215d0e15cbcfa9d3c38e3347d 100644 |
--- a/chrome/browser/ui/cocoa/download/download_item_controller.h |
+++ b/chrome/browser/ui/cocoa/download/download_item_controller.h |
@@ -34,7 +34,42 @@ class MenuModel; |
} |
// A controller class that manages one download item. |
- |
+// |
+// The view hierarchy is as follows: |
+// |
+// DownloadItemController |
+// | |
+// | A container that is showing one of its child views (progressView_ or |
+// | dangerousDownloadView_) depending on whether the download is safe or not. |
+// | |
+// +-- progressView_ (instance of DownloadItemButton) |
+// | | |
+// | +-- cell_ (instance of DownloadItemCell) |
+// | |
+// +-- dangerousDownloadView_ |
+// | |
+// | Contains the dangerous download warning. Dependong on whether the |
+// | download is dangerous (e.g. dangerous due to type of file), or |
+// | malicious (e.g. downloaded from a known malware site) only one of |
+// | dangerousButtonTweaker_ or maliciousButtonTweaker_ will be visible at |
+// | one time. |
+// | |
+// +-- dangerousDownloadLabel_ |
+// | |
+// +-- image_ |
+// | |
+// +-- dangerousButtonTweaker_ |
+// | |
+// | Contains the 'Discard'/'Save' buttons for a dangerous download. This |
+// | is a GTMWidthBasedTweaker that adjusts the width based on the text of |
+// | buttons. |
+// | |
+// +-- maliciousButtonTweaker_ |
+// |
+// Contains the 'Discard' button and the drop down context menu button. |
+// This is a GTMWidthBasedTweaker that adjusts the width based on the |
+// text of the 'Discard' button. |
+// |
@interface DownloadItemController : NSViewController { |
@private |
IBOutlet DownloadItemButton* progressView_; |
@@ -71,7 +106,7 @@ class MenuModel; |
scoped_ptr<gfx::FontList> font_list_; |
// The state of this item. |
- enum DownoadItemState { |
+ enum DownloadItemState { |
kNormal, |
kDangerous |
} state_; |
@@ -126,4 +161,5 @@ class MenuModel; |
- (IBAction)discardDownload:(id)sender; |
- (IBAction)dismissMaliciousDownload:(id)sender; |
- (IBAction)showContextMenu:(id)sender; |
+ |
@end |