Index: chrome/browser/app_controller_mac.mm |
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm |
index a90577ad52f2e4a2e17096f8e92b5970b1053825..2242075c3d07dee832c9d61fbaa21e1287e764de 100644 |
--- a/chrome/browser/app_controller_mac.mm |
+++ b/chrome/browser/app_controller_mac.mm |
@@ -681,8 +681,7 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { |
// 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 (apps::IsAppShimsEnabled()) |
- appShimMenuController_.reset([[AppShimMenuController alloc] init]); |
+ [self initAppShimMenuController]; |
Nico
2013/11/04 00:22:58
I meant "can you keep the `if (apps::IsAppShimsEna
|
// Build up the encoding menu, the order of the items differs based on the |
// current locale (see http://crbug.com/7647 for details). |
@@ -1461,6 +1460,11 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver { |
workAreaChangeObservers_.RemoveObserver(observer); |
} |
+- (void)initAppShimMenuController { |
+ if (apps::IsAppShimsEnabled() && !appShimMenuController_) |
+ appShimMenuController_.reset([[AppShimMenuController alloc] init]); |
+} |
+ |
- (void)applicationDidChangeScreenParameters:(NSNotification*)notification { |
// During this callback the working area is not always already updated. Defer. |
[self performSelector:@selector(delayedScreenParametersUpdate) |