| Index: chrome/browser/app_controller_mac.mm
|
| diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
|
| index 7c61f06bfa982a0d52c41fdbbc606a74e699f9c8..01856645e05643e420564f258cfcf65356ad4c5b 100644
|
| --- a/chrome/browser/app_controller_mac.mm
|
| +++ b/chrome/browser/app_controller_mac.mm
|
| @@ -53,6 +53,7 @@
|
| #include "chrome/browser/ui/browser_mac.h"
|
| #include "chrome/browser/ui/browser_window.h"
|
| #include "chrome/browser/ui/chrome_pages.h"
|
| +#import "chrome/browser/ui/cocoa/apps/app_menu_controller_mac.h"
|
| #import "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h"
|
| #import "chrome/browser/ui/cocoa/browser_window_cocoa.h"
|
| #import "chrome/browser/ui/cocoa/browser_window_controller.h"
|
| @@ -433,6 +434,8 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
|
| localPrefRegistrar_.RemoveAll();
|
|
|
| [self unregisterEventHandlers];
|
| + [appMenuController_ unregisterEventHandlers];
|
| + appMenuController_.reset();
|
| }
|
|
|
| - (void)didEndMainMessageLoop {
|
| @@ -651,6 +654,11 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
|
|
|
| [self setUpdateCheckInterval];
|
|
|
| + // Start managing the menu for app windows. This needs to be done here because
|
| + // main menu item titles are not yet initialized in awakeFromNib.
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAppShims))
|
| + appMenuController_.reset([[AppMenuController alloc] init]);
|
| +
|
| // Build up the encoding menu, the order of the items differs based on the
|
| // current locale (see http://crbug.com/7647 for details).
|
| // We need a valid g_browser_process to get the profile which is why we can't
|
|
|