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

Side by Side Diff: chrome/browser/cocoa/bookmark_bar_controller.h

Issue 348017: Add the "Other bookmarks" button on the right of the bookmark bar.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_
6 #define CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_ 6 #define CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <map> 9 #include <map>
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // Delegate that can resize us. 88 // Delegate that can resize us.
89 id<ViewResizer> resizeDelegate_; // weak 89 id<ViewResizer> resizeDelegate_; // weak
90 90
91 // Delegate that can open URLs for us. 91 // Delegate that can open URLs for us.
92 id<BookmarkURLOpener> urlDelegate_; // weak 92 id<BookmarkURLOpener> urlDelegate_; // weak
93 93
94 // Lets us get TabSelectedAt notifications. 94 // Lets us get TabSelectedAt notifications.
95 scoped_ptr<TabStripModelObserverBridge> tabObserver_; 95 scoped_ptr<TabStripModelObserverBridge> tabObserver_;
96 96
97 IBOutlet BookmarkBarView* buttonView_; 97 IBOutlet BookmarkBarView* buttonView_;
98 IBOutlet MenuButton* offTheSideButton_; 98 IBOutlet MenuButton* offTheSideButton_; // aka the chevron
99 IBOutlet NSMenu* buttonContextMenu_; 99 IBOutlet NSMenu* buttonContextMenu_;
100
101 // "Other bookmarks" button on the right side.
102 scoped_nsobject<NSButton> otherBookmarksButton_;
100 } 103 }
101 104
102 // Initializes the bookmark bar controller with the given browser 105 // Initializes the bookmark bar controller with the given browser
103 // profile and delegates. 106 // profile and delegates.
104 - (id)initWithBrowser:(Browser*)browser 107 - (id)initWithBrowser:(Browser*)browser
105 initialWidth:(float)initialWidth 108 initialWidth:(float)initialWidth
106 compressDelegate:(id<ToolbarCompressable>)compressDelegate 109 compressDelegate:(id<ToolbarCompressable>)compressDelegate
107 resizeDelegate:(id<ViewResizer>)resizeDelegate 110 resizeDelegate:(id<ViewResizer>)resizeDelegate
108 urlDelegate:(id<BookmarkURLOpener>)urlDelegate; 111 urlDelegate:(id<BookmarkURLOpener>)urlDelegate;
109 112
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 node:(const BookmarkNode*)node; 180 node:(const BookmarkNode*)node;
178 - (void)nodeChildrenReordered:(BookmarkModel*)model 181 - (void)nodeChildrenReordered:(BookmarkModel*)model
179 node:(const BookmarkNode*)node; 182 node:(const BookmarkNode*)node;
180 @end 183 @end
181 184
182 185
183 // These APIs should only be used by unit tests (or used internally). 186 // These APIs should only be used by unit tests (or used internally).
184 @interface BookmarkBarController(InternalOrTestingAPI) 187 @interface BookmarkBarController(InternalOrTestingAPI)
185 // Set the delegate for a unit test. 188 // Set the delegate for a unit test.
186 - (void)setUrlDelegate:(id<BookmarkURLOpener>)urlDelegate; 189 - (void)setUrlDelegate:(id<BookmarkURLOpener>)urlDelegate;
190 - (NSCell*)cellForBookmarkNode:(const BookmarkNode*)node;
187 - (void)clearBookmarkBar; 191 - (void)clearBookmarkBar;
188 - (BookmarkBarView*)buttonView; 192 - (BookmarkBarView*)buttonView;
189 - (NSArray*)buttons; 193 - (NSArray*)buttons;
190 - (NSRect)frameForBookmarkButtonFromCell:(NSCell*)cell xOffset:(int*)xOffset; 194 - (NSRect)frameForBookmarkButtonFromCell:(NSCell*)cell xOffset:(int*)xOffset;
191 - (void)checkForBookmarkButtonGrowth:(NSButton*)button; 195 - (void)checkForBookmarkButtonGrowth:(NSButton*)button;
192 - (void)frameDidChange; 196 - (void)frameDidChange;
193 - (BOOL)offTheSideButtonIsHidden; 197 - (BOOL)offTheSideButtonIsHidden;
194 - (NSMenu *)menuForFolderNode:(const BookmarkNode*)node; 198 - (NSMenu *)menuForFolderNode:(const BookmarkNode*)node;
195 - (int64)nodeIdFromMenuTag:(int32)tag; 199 - (int64)nodeIdFromMenuTag:(int32)tag;
196 - (int32)menuTagFromNodeId:(int64)menuid; 200 - (int32)menuTagFromNodeId:(int64)menuid;
197 - (void)buildOffTheSideMenu; 201 - (void)buildOffTheSideMenu;
198 - (NSMenu*)offTheSideMenu; 202 - (NSMenu*)offTheSideMenu;
203 - (NSButton*)offTheSideButton;
204 - (NSButton*)otherBookmarksButton;
199 @end 205 @end
200 206
201 #endif // CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_ 207 #endif // CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bookmark_bar_constants.h ('k') | chrome/browser/cocoa/bookmark_bar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698