diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-05 19:55:29 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-05 19:55:29 +0000 |
commit | 6dcefa2aded298fa4015a5da4f54e56c65061ab0 (patch) | |
tree | 716fc188a1c25beac2bf039ad32749a7788fc722 /chrome/browser/cocoa/toolbar_controller.h | |
parent | efc3315b53e2c3cc6d6aecfa04738447b701f806 (diff) | |
download | chromium_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/toolbar_controller.h')
-rw-r--r-- | chrome/browser/cocoa/toolbar_controller.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/cocoa/toolbar_controller.h b/chrome/browser/cocoa/toolbar_controller.h index 73891ec..f4fde8b 100644 --- a/chrome/browser/cocoa/toolbar_controller.h +++ b/chrome/browser/cocoa/toolbar_controller.h @@ -11,6 +11,7 @@ #include "base/scoped_nsobject.h" #import "chrome/browser/cocoa/command_observer_bridge.h" #import "chrome/browser/cocoa/bookmark_bar_controller.h" +#import "chrome/browser/cocoa/view_resizer.h" #include "chrome/common/pref_member.h" @class AutocompleteTextField; @@ -31,7 +32,8 @@ class ToolbarView; // Manages the bookmark bar and it's position in the window relative to // the web content view. -@interface ToolbarController : NSViewController<CommandObserverProtocol> { +@interface ToolbarController : + NSViewController<CommandObserverProtocol, ViewResizer> { @private ToolbarModel* toolbarModel_; // weak, one per window CommandUpdater* commands_; // weak, one per window @@ -40,9 +42,8 @@ class ToolbarView; scoped_ptr<LocationBarViewMac> locationBarView_; scoped_nsobject<AutocompleteTextFieldEditor> autocompleteTextFieldEditor_; scoped_nsobject<BookmarkBarController> bookmarkBarController_; + id<ViewResizer> resizeDelegate_; // weak id<BookmarkURLOpener> bookmarkBarDelegate_; // weak - NSView* webContentView_; // weak; where the web goes - NSView* infoBarsView_; // weak; where the infobars go // Used for monitoring the optional toolbar button prefs. scoped_ptr<ToolbarControllerInternal::PrefObserverBridge> prefObserver_; @@ -72,8 +73,7 @@ class ToolbarView; - (id)initWithModel:(ToolbarModel*)model commands:(CommandUpdater*)commands profile:(Profile*)profile - webContentView:(NSView*)webContentView - infoBarsView:(NSView*)infoBarsView + resizeDelegate:(id<ViewResizer>)resizeDelegate bookmarkDelegate:(id<BookmarkURLOpener>)delegate; // Get the C++ bridge object representing the location bar for this tab. |