Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 55683002: Instantiate AppShimMenuController when app launcher is enabled. (Mac) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Expose InitAppShimMenuController in AppController Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698