diff options
Diffstat (limited to 'chrome/browser/cocoa/download_shelf_controller.h')
-rw-r--r-- | chrome/browser/cocoa/download_shelf_controller.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/download_shelf_controller.h b/chrome/browser/cocoa/download_shelf_controller.h index f598d5c..c72538a 100644 --- a/chrome/browser/cocoa/download_shelf_controller.h +++ b/chrome/browser/cocoa/download_shelf_controller.h @@ -14,12 +14,30 @@ class Browser; class DownloadShelf; @class DownloadShelfView; -// A controller class that manages the download shelf for one window. +// A controller class that manages the download shelf for one window. It is +// responsible for the behavior of the shelf itself (showing/hiding, handling +// the link, layout) as well as for managing the download items it contains. +// +// All the files in cocoa/downloads_* are related as follows: +// +// download_shelf_mac bridges calls from chromium's c++ world to the objc +// download_shelf_controller for the shelf (this file). The shelf's background +// is drawn by download_shelf_view. Every item in a shelf is controlled by a +// download_item_controller. +// +// download_item_mac bridges calls from chromium's c++ world to the objc +// download_item_controller, which is responsible for managing a single item +// on the shelf. The item controller loads its UI from a xib file, where the +// UI of an item itself is represented by a button that is drawn by +// download_item_cell. @interface DownloadShelfController : NSViewController { @private + IBOutlet NSScrollView* linkContainer_; IBOutlet NSTextView* showAllDownloadsLink_; + IBOutlet NSImageView* image_; + // Currently these two are always the same, but they mean slightly different // things. |contentAreaHasOffset_| is an implementation detail of the download // shelf visibility. @@ -27,11 +45,14 @@ class DownloadShelf; BOOL barIsVisible_; scoped_ptr<DownloadShelf> bridge_; - NSView* contentArea_; + NSView* contentArea_; // the browser's content area float shelfHeight_; // The download items we have added to our shelf. scoped_nsobject<NSMutableArray> downloadItemControllers_; + + // The container that contains (and clamps) all the download items. + IBOutlet NSView* itemContainerView_; }; - (id)initWithBrowser:(Browser*)browser contentArea:(NSView*)content; |