diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-05 21:29:23 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-05 21:29:23 +0000 |
commit | 9ec8a8ce8b2cb0c29387ddccce7fb0fb356e0b2c (patch) | |
tree | ad3c06b773e83f28e80c652d7003d357a21aa3bc /chrome/browser/cocoa/bookmark_bar_controller.h | |
parent | 991cf3c582cf9c8c4ee877349e1cd35ac2b838e9 (diff) | |
download | chromium_src-9ec8a8ce8b2cb0c29387ddccce7fb0fb356e0b2c.zip chromium_src-9ec8a8ce8b2cb0c29387ddccce7fb0fb356e0b2c.tar.gz chromium_src-9ec8a8ce8b2cb0c29387ddccce7fb0fb356e0b2c.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_controller.h')
-rw-r--r-- | chrome/browser/cocoa/bookmark_bar_controller.h | 35 |
1 files changed, 20 insertions, 15 deletions
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<BookmarkBarBridge> bridge_; - // Delegate that can resize us. - id<ViewResizer> resizeDelegate_; // weak - - // Delegate that can open URLs for us. - id<BookmarkURLOpener> urlDelegate_; // weak + // Delegate which can open URLs for us. + id<BookmarkURLOpener> 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<ViewResizer>)resizeDelegate - urlDelegate:(id<BookmarkURLOpener>)urlDelegate; + parentView:(NSView*)parentView + webContentView:(NSView*)webContentView + infoBarsView:(NSView*)infoBarsView + delegate:(id<BookmarkURLOpener>)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<BookmarkURLOpener>)urlDelegate; +- (void)setDelegate:(id<BookmarkURLOpener>)delegate; - (void)clearBookmarkBar; - (NSView*)buttonView; - (NSArray*)buttons; |