From 9ec8a8ce8b2cb0c29387ddccce7fb0fb356e0b2c Mon Sep 17 00:00:00 2001 From: "rohitrao@chromium.org" Date: Wed, 5 Aug 2009 21:29:23 +0000 Subject: Reverting 22517. Review URL: http://codereview.chromium.org/165001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22541 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/bookmark_bar_controller.h | 35 +++++++++++++++----------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'chrome/browser/cocoa/bookmark_bar_controller.h') diff --git a/chrome/browser/cocoa/bookmark_bar_controller.h b/chrome/browser/cocoa/bookmark_bar_controller.h index 23b211c..c035fc2 100644 --- a/chrome/browser/cocoa/bookmark_bar_controller.h +++ b/chrome/browser/cocoa/bookmark_bar_controller.h @@ -20,7 +20,6 @@ class BookmarkNode; class GURL; class Profile; class PrefService; -@protocol ViewResizer; // The interface for an object which can open URLs for a bookmark. @protocol BookmarkURLOpener @@ -37,8 +36,12 @@ class PrefService; BookmarkModel* bookmarkModel_; // weak; part of the profile owned by the // top-level Browser object. - // Our initial view width, which is applied in awakeFromNib. - float initialWidth_; + // Currently these two are always the same when not in fullscreen + // mode, but they mean slightly different things. + // contentAreaHasOffset_ is an implementation detail of bookmark bar + // show state. + BOOL contentViewHasOffset_; + BOOL barShouldBeShown_; // BookmarkNodes have a 64bit id. NSMenuItems have a 32bit tag used // to represent the bookmark node they refer to. This map provides @@ -54,18 +57,16 @@ class PrefService; // Set when using fullscreen mode. BOOL barIsEnabled_; - // Set to YES when the user elects to always show the bookmark bar. - BOOL barShouldBeShown_; + NSView* parentView_; // weak; our parent view + NSView* webContentView_; // weak; where the web goes + NSView* infoBarsView_; // weak; where the infobars go // Bridge from Chrome-style C++ notifications (e.g. derived from // BookmarkModelObserver) scoped_ptr bridge_; - // Delegate that can resize us. - id resizeDelegate_; // weak - - // Delegate that can open URLs for us. - id urlDelegate_; // weak + // Delegate which can open URLs for us. + id delegate_; // weak IBOutlet NSView* buttonView_; IBOutlet NSButton* offTheSideButton_; @@ -73,11 +74,15 @@ class PrefService; } // Initializes the bookmark bar controller with the given browser -// profile and delegates. +// profile, parent view (the toolbar), web content view, and delegate. +// |delegate| is used for opening URLs. +// TODO(rohitrao, jrg): The bookmark bar shouldn't know about the +// infoBarsView or the webContentView. - (id)initWithProfile:(Profile*)profile - initialWidth:(float)initialWidth - resizeDelegate:(id)resizeDelegate - urlDelegate:(id)urlDelegate; + parentView:(NSView*)parentView + webContentView:(NSView*)webContentView + infoBarsView:(NSView*)infoBarsView + delegate:(id)delegate; // Returns whether or not the bookmark bar is visible. - (BOOL)isBookmarkBarVisible; @@ -133,7 +138,7 @@ class PrefService; // These APIs should only be used by unit tests (or used internally). @interface BookmarkBarController(InternalOrTestingAPI) // Set the delegate for a unit test. -- (void)setUrlDelegate:(id)urlDelegate; +- (void)setDelegate:(id)delegate; - (void)clearBookmarkBar; - (NSView*)buttonView; - (NSArray*)buttons; -- cgit v1.1