diff options
Diffstat (limited to 'chrome/browser/cocoa/toolbar_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/toolbar_controller.mm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/toolbar_controller.mm b/chrome/browser/cocoa/toolbar_controller.mm index 1a3bc74..dab9537 100644 --- a/chrome/browser/cocoa/toolbar_controller.mm +++ b/chrome/browser/cocoa/toolbar_controller.mm @@ -8,6 +8,7 @@ #include "app/l10n_util_mac.h" #include "app/menus/accelerator_cocoa.h" +#include "app/menus/menu_model.h" #include "base/keyboard_codes.h" #include "base/mac_util.h" #include "base/nsimage_cache_mac.h" @@ -31,6 +32,7 @@ #import "chrome/browser/cocoa/menu_controller.h" #import "chrome/browser/cocoa/reload_button.h" #import "chrome/browser/cocoa/toolbar_view.h" +#import "chrome/browser/cocoa/wrench_menu_controller.h" #include "chrome/browser/net/url_fixer_upper.h" #include "chrome/browser/pref_service.h" #include "chrome/browser/profile.h" @@ -511,12 +513,15 @@ class PrefObserverBridge : public NotificationObserver { menuDelegate_.reset(new ToolbarControllerInternal::MenuDelegate(browser_)); wrenchMenuModel_.reset(new WrenchMenuModel(menuDelegate_.get(), browser_)); - wrenchMenuController_.reset( - [[MenuController alloc] initWithModel:wrenchMenuModel_.get() - useWithPopUpButtonCell:YES]); + [wrenchMenuController_ setModel:wrenchMenuModel_.get()]; + [wrenchMenuController_ setUseWithPopUpButtonCell:YES]; [wrenchButton_ setAttachedMenu:[wrenchMenuController_ menu]]; } +- (WrenchMenuController*)wrenchMenuController { + return wrenchMenuController_; +} + - (void)prefChanged:(std::wstring*)prefName { if (!prefName) return; if (*prefName == prefs::kShowHomeButton) { |