summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_bar_controller.h
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 20:43:14 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 20:43:14 +0000
commit04a3942cf4419e0f21105934e92168583e1d49c4 (patch)
tree4ace473662dcaf431cc392a78cce6dd817e0f08d /chrome/browser/cocoa/bookmark_bar_controller.h
parent1319d3b2391006b26b095b2d1f69c424eb237ae9 (diff)
downloadchromium_src-04a3942cf4419e0f21105934e92168583e1d49c4.zip
chromium_src-04a3942cf4419e0f21105934e92168583e1d49c4.tar.gz
chromium_src-04a3942cf4419e0f21105934e92168583e1d49c4.tar.bz2
(Mac) Display the bookmark bar off-the-side menu on mouse down. Also align the menu.
(Basically, make it like Safari's button.) We make the button into a |MenuButton|, attach a fixed menu to it in the nib, and make the |BookmarkBarController| the delegate for this menu so that we can update the menu just before it's displayed. As a side effect, also fixes bug 20813. BUG=21093,20813 TEST=Make sure the bookmark bar off-the-side button works properly under a variety of circumstances, making sure the menu is properly aligned, etc. Review URL: http://codereview.chromium.org/199024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25507 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_controller.h')
-rw-r--r--chrome/browser/cocoa/bookmark_bar_controller.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.h b/chrome/browser/cocoa/bookmark_bar_controller.h
index a2ae151..548210e 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller.h
+++ b/chrome/browser/cocoa/bookmark_bar_controller.h
@@ -18,6 +18,7 @@ class BookmarkModel;
class BookmarkNode;
@class BookmarkBarView;
class GURL;
+@class MenuButton;
class Profile;
class PrefService;
@protocol ViewResizer;
@@ -68,7 +69,7 @@ class PrefService;
id<BookmarkURLOpener> urlDelegate_; // weak
IBOutlet NSView* buttonView_;
- IBOutlet NSButton* offTheSideButton_;
+ IBOutlet MenuButton* offTheSideButton_;
IBOutlet NSMenu* buttonContextMenu_;
}
@@ -98,7 +99,6 @@ class PrefService;
// 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;
@@ -148,6 +148,8 @@ class PrefService;
- (NSMenu *)menuForFolderNode:(const BookmarkNode*)node;
- (int64)nodeIdFromMenuTag:(int32)tag;
- (int32)menuTagFromNodeId:(int64)menuid;
+- (void)buildOffTheSideMenu;
+- (NSMenu*)offTheSideMenu;
@end
#endif // CHROME_BROWSER_COCOA_BOOKMARK_BAR_CONTROLLER_H_