summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/download_shelf_controller.h
diff options
context:
space:
mode:
authorrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 19:55:29 +0000
committerrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 19:55:29 +0000
commit6dcefa2aded298fa4015a5da4f54e56c65061ab0 (patch)
tree716fc188a1c25beac2bf039ad32749a7788fc722 /chrome/browser/cocoa/download_shelf_controller.h
parentefc3315b53e2c3cc6d6aecfa04738447b701f806 (diff)
downloadchromium_src-6dcefa2aded298fa4015a5da4f54e56c65061ab0.zip
chromium_src-6dcefa2aded298fa4015a5da4f54e56c65061ab0.tar.gz
chromium_src-6dcefa2aded298fa4015a5da4f54e56c65061ab0.tar.bz2
Rewrites the Mac view resizing logic to have the BrowserWindowController
directly resize and relayout its children views. Now when a view needs to be resized, it asks its resize delegate (typically its controller's parent) to perform the resize. BUG=http://crbug.com/17619 TEST=Make sure that views are laid out correctly, even when they change size. Open and close the bookmark bar. Trigger an infobar and then close it. Trigger the download shelf and then close it. Trigger a download shelf with the infobar open, or with the bookmark bar open. Switch to and from fullscreen with various bars open. Resize the browser window with various bars open. Start the browser with and without the bookmark bar open. Try all of the above in a popup window. Review URL: http://codereview.chromium.org/159776 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22517 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/download_shelf_controller.h')
-rw-r--r--chrome/browser/cocoa/download_shelf_controller.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/chrome/browser/cocoa/download_shelf_controller.h b/chrome/browser/cocoa/download_shelf_controller.h
index c72538a..9ace0d3 100644
--- a/chrome/browser/cocoa/download_shelf_controller.h
+++ b/chrome/browser/cocoa/download_shelf_controller.h
@@ -6,6 +6,7 @@
#include "base/scoped_nsobject.h"
#include "base/scoped_ptr.h"
+#import "chrome/browser/cocoa/view_resizer.h"
class BaseDownloadItemModel;
class Browser;
@@ -38,14 +39,9 @@ class DownloadShelf;
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.
- BOOL contentAreaHasOffset_;
BOOL barIsVisible_;
scoped_ptr<DownloadShelf> bridge_;
- NSView* contentArea_; // the browser's content area
float shelfHeight_;
// The download items we have added to our shelf.
@@ -53,9 +49,13 @@ class DownloadShelf;
// The container that contains (and clamps) all the download items.
IBOutlet NSView* itemContainerView_;
+
+ // Delegate that handles resizing our view.
+ id<ViewResizer> resizeDelegate_;
};
-- (id)initWithBrowser:(Browser*)browser contentArea:(NSView*)content;
+- (id)initWithBrowser:(Browser*)browser
+ resizeDelegate:(id<ViewResizer>)resizeDelegate;
- (DownloadShelf*)bridge;
- (BOOL)isVisible;
@@ -67,9 +67,6 @@ class DownloadShelf;
- (void)addDownloadItem:(BaseDownloadItemModel*)model;
-// Resizes the download shelf based on the state of the content area.
-- (void)resizeDownloadShelf;
-
// Remove a download, possibly via clearing browser data.
- (void)remove:(DownloadItemController*)download;