diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 20:42:24 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 20:42:24 +0000 |
commit | 1c977ab1081a4891419e40d6e4b1615c6e2583fb (patch) | |
tree | c82a78a053227719ae46739ef67f807ad095db4a /chrome/browser/cocoa/toolbar_controller.h | |
parent | 588ac782287d7cbe82b71b825f268b8e0f026174 (diff) | |
download | chromium_src-1c977ab1081a4891419e40d6e4b1615c6e2583fb.zip chromium_src-1c977ab1081a4891419e40d6e4b1615c6e2583fb.tar.gz chromium_src-1c977ab1081a4891419e40d6e4b1615c6e2583fb.tar.bz2 |
(Mac) Make the Page/Wrench buttons place their menu in the right place.
Also makes the buttons drag-able -- you can drag or click and wait to
open their menu. Lucky for me, I wrote reusable code.
To do (not now): The "off-the-end" button on the bookmark bar needs the
same fix.
Bug (not to be fixed now): The menu doesn't do the right thing when the
window is moved off the left edge to the screen -- it doesn't open to
the right in the correct fashion. Nor does it do the proper thing when
you move the window off the bottom edge of the screen -- it doesn't open
upwards entirely correctly. <shrug>
BUG=18572
TEST=Click on the Page and Wrench menu buttons and observe. Also test \
dragging to open.
Review URL: http://codereview.chromium.org/174556
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25362 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/toolbar_controller.h')
-rw-r--r-- | chrome/browser/cocoa/toolbar_controller.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/chrome/browser/cocoa/toolbar_controller.h b/chrome/browser/cocoa/toolbar_controller.h index f5819a5..a442d88 100644 --- a/chrome/browser/cocoa/toolbar_controller.h +++ b/chrome/browser/cocoa/toolbar_controller.h @@ -18,8 +18,9 @@ class AutocompletePopupPositioner; @class AutocompleteTextField; @class AutocompleteTextFieldEditor; -@class DelayedMenuButton; @class BackForwardMenuController; +@class DelayedMenuButton; +@class MenuButton; class Browser; class CommandUpdater; class LocationBar; @@ -69,9 +70,6 @@ class ToolbarView; scoped_nsobject<NSTrackingArea> trackingArea_; NSButton* hoveredButton_; // weak. Button under the mouse cursor. - IBOutlet NSMenu* pageMenu_; - IBOutlet NSMenu* wrenchMenu_; - // The ordering is important for unit tests. If new items are added or the // ordering is changed, make sure to update |-toolbarViews| and the // corresponding enum in the unit tests. @@ -81,8 +79,8 @@ class ToolbarView; IBOutlet NSButton* homeButton_; IBOutlet NSButton* starButton_; IBOutlet NSButton* goButton_; - IBOutlet NSButton* pageButton_; - IBOutlet NSButton* wrenchButton_; + IBOutlet MenuButton* pageButton_; + IBOutlet MenuButton* wrenchButton_; IBOutlet AutocompleteTextField* locationBar_; } @@ -130,11 +128,6 @@ class ToolbarView; // Return the bookmark bar controller. - (BookmarkBarController*)bookmarkBarController; -// Actions for the optional menu buttons for the page and wrench menus. These -// will show a menu while the mouse is down. -- (IBAction)showPageMenu:(id)sender; -- (IBAction)showWrenchMenu:(id)sender; - // The bookmark bubble (when you click the star) needs to know where to go. // Somewhere near the star button seems like a good start. - (NSRect)starButtonInWindowCoordinates; |