diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 20:43:14 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-04 20:43:14 +0000 |
commit | 04a3942cf4419e0f21105934e92168583e1d49c4 (patch) | |
tree | 4ace473662dcaf431cc392a78cce6dd817e0f08d /chrome/browser/cocoa/menu_button.mm | |
parent | 1319d3b2391006b26b095b2d1f69c424eb237ae9 (diff) | |
download | chromium_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/menu_button.mm')
-rw-r--r-- | chrome/browser/cocoa/menu_button.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/menu_button.mm b/chrome/browser/cocoa/menu_button.mm index aed8034..23d5d0e 100644 --- a/chrome/browser/cocoa/menu_button.mm +++ b/chrome/browser/cocoa/menu_button.mm @@ -54,7 +54,7 @@ // Reset various settings of the button and its associated |ClickHoldButtonCell| // to the standard state which provides reasonable defaults. - (void)resetToDefaults { - id cell = [self cell]; + ClickHoldButtonCell* cell = [self cell]; DCHECK([cell isKindOfClass:[ClickHoldButtonCell class]]); [cell setEnableClickHold:YES]; [cell setClickHoldTimeout:0.0]; // Make menu trigger immediately. |