| Index: chrome/browser/cocoa/bookmark_bar_controller.h
|
| ===================================================================
|
| --- chrome/browser/cocoa/bookmark_bar_controller.h (revision 21293)
|
| +++ chrome/browser/cocoa/bookmark_bar_controller.h (working copy)
|
| @@ -40,6 +40,13 @@
|
| 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
|
| + // a mapping from one to the other, so we can properly identify the
|
| + // node from the item. When adding items in, we start with seedId_.
|
| + int32 seedId_;
|
| + std::map<int32,int64> menuTagMap_;
|
| +
|
| // Our bookmark buttons, ordered from L-->R.
|
| scoped_nsobject<NSMutableArray> buttons_;
|
|
|
| @@ -58,6 +65,8 @@
|
| // Delegate which can open URLs for us.
|
| id<BookmarkURLOpener> delegate_; // weak
|
|
|
| + IBOutlet NSView* buttonView_;
|
| + IBOutlet NSButton* offTheSideButton_;
|
| IBOutlet NSMenu* buttonContextMenu_;
|
| }
|
|
|
| @@ -86,6 +95,8 @@
|
| // Actions for manipulating bookmarks.
|
| // From a button, ...
|
| - (IBAction)openBookmark:(id)sender;
|
| +- (IBAction)openFolderMenuFromButton:(id)sender;
|
| +- (IBAction)openOffTheSideMenuFromButton:(id)sender;
|
| // From a context menu over the button, ...
|
| - (IBAction)openBookmarkInNewForegroundTab:(id)sender;
|
| - (IBAction)openBookmarkInNewWindow:(id)sender;
|
| @@ -98,7 +109,6 @@
|
| - (IBAction)addPage:(id)sender;
|
| - (IBAction)addOrRenameFolder:(id)sender;
|
|
|
| -
|
| @end
|
|
|
| // Redirects from BookmarkBarBridge, the C++ object which glues us to
|
| @@ -123,13 +133,19 @@
|
|
|
|
|
| // These APIs should only be used by unit tests (or used internally).
|
| -@interface BookmarkBarController(TestingAPI)
|
| +@interface BookmarkBarController(InternalOrTestingAPI)
|
| // Set the delegate for a unit test.
|
| - (void)setDelegate:(id<BookmarkURLOpener>)delegate;
|
| - (void)clearBookmarkBar;
|
| +- (NSView*)buttonView;
|
| - (NSArray*)buttons;
|
| - (NSRect)frameForBookmarkButtonFromCell:(NSCell*)cell xOffset:(int*)xOffset;
|
| - (void)checkForBookmarkButtonGrowth:(NSButton*)button;
|
| +- (void)frameDidChange;
|
| +- (BOOL)offTheSideButtonIsEnabled;
|
| +- (NSMenu *)menuForFolderNode:(const BookmarkNode*)node;
|
| +- (int64)nodeIdFromMenuTag:(int32)tag;
|
| +- (int32)menuTagFromNodeId:(int64)menuid;
|
| @end
|
|
|
| #endif // CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_
|
|
|