Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(813)

Unified Diff: chrome/browser/cocoa/bookmark_bar_controller.h

Issue 155358: More bookmark bar changes.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/bookmark_bar_controller.h
===================================================================
--- chrome/browser/cocoa/bookmark_bar_controller.h (revision 20588)
+++ chrome/browser/cocoa/bookmark_bar_controller.h (working copy)
@@ -27,7 +27,7 @@
// A controller for the bookmark bar in the browser window. Handles showing
// and hiding based on the preference in the given profile.
-@interface BookmarkBarController : NSObject {
+@interface BookmarkBarController : NSViewController {
@private
BookmarkModel* bookmarkModel_; // weak; part of the profile owned by the
// top-level Browser object.
@@ -44,10 +44,7 @@
// Set when using fullscreen mode.
BOOL barIsEnabled_;
- // The view of the bookmark bar itself.
- // Owned by the toolbar view, its parent view.
- BookmarkBarView* bookmarkBarView_; // weak
-
+ NSView* parentView_; // weak; our parent view
NSView* webContentView_; // weak; where the web goes
// Bridge from Chrome-style C++ notifications (e.g. derived from
@@ -56,14 +53,15 @@
// Delegate which can open URLs for us.
id<BookmarkURLOpener> delegate_; // weak
+
+ IBOutlet NSMenu* buttonContextMenu_;
}
-// Initializes the controller with the given browser profile and
-// content view. We use |webContentView| as the view for the bookmark
-// bar view and for geometry management. |delegate| is used for
-// opening URLs. |view| is expected to be hidden.
+// Initializes the bookmark bar controller with the given browser
+// profile, parent view (the toolbar), web content view, and delegate.
+// |delegate| is used for opening URLs.
- (id)initWithProfile:(Profile*)profile
- view:(BookmarkBarView*)view
+ parentView:(NSView*)parentView
webContentView:(NSView*)webContentView
delegate:(id<BookmarkURLOpener>)delegate;
@@ -78,6 +76,14 @@
// if needed. For fullscreen mode.
- (void)setBookmarkBarEnabled:(BOOL)enabled;
+// Actions for opening bookmarks. From a button, ...
+- (IBAction)openBookmark:(id)sender;
+// ... or from a context menu over the button.
+- (IBAction)openBookmarkInNewForegroundTab:(id)sender;
+- (IBAction)openBookmarkInNewWindow:(id)sender;
+- (IBAction)openBookmarkInIncognitoWindow:(id)sender;
+- (IBAction)deleteBookmark:(id)sender;
+
@end
// Redirects from BookmarkBarBridge, the C++ object which glues us to
@@ -90,6 +96,8 @@
newParent:(const BookmarkNode*)newParent newIndex:(int)newIndex;
- (void)nodeAdded:(BookmarkModel*)model
parent:(const BookmarkNode*)oldParent index:(int)index;
+- (void)nodeRemoved:(BookmarkModel*)model
+ parent:(const BookmarkNode*)oldParent index:(int)index;
- (void)nodeChanged:(BookmarkModel*)model
node:(const BookmarkNode*)node;
- (void)nodeFavIconLoaded:(BookmarkModel*)model
@@ -101,12 +109,8 @@
// These APIs should only be used by unit tests (or used internally).
@interface BookmarkBarController(TestingAPI)
-// Access to the bookmark bar's view represented by this controller.
-- (NSView*)view;
// Set the delegate for a unit test.
- (void)setDelegate:(id<BookmarkURLOpener>)delegate;
-// Action for our bookmark buttons.
-- (void)openBookmark:(id)sender;
@end
#endif // CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_
« no previous file with comments | « chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm ('k') | chrome/browser/cocoa/bookmark_bar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698