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

Side by Side Diff: chrome/browser/app_controller_mac.mm

Issue 23558007: Use apps::IsAppShimsEnabled instead of kEnableAppShims (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/app_controller_mac.h" 5 #import "chrome/browser/app_controller_mac.h"
6 6
7 #include "apps/app_shim/app_shim_mac.h"
7 #include "apps/app_shim/extension_app_shim_handler_mac.h" 8 #include "apps/app_shim/extension_app_shim_handler_mac.h"
8 #include "apps/shell_window_registry.h" 9 #include "apps/shell_window_registry.h"
9 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
10 #include "base/bind.h" 11 #include "base/bind.h"
11 #include "base/command_line.h" 12 #include "base/command_line.h"
12 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
13 #include "base/mac/foundation_util.h" 14 #include "base/mac/foundation_util.h"
14 #include "base/mac/mac_util.h" 15 #include "base/mac/mac_util.h"
15 #include "base/message_loop/message_loop.h" 16 #include "base/message_loop/message_loop.h"
16 #include "base/prefs/pref_service.h" 17 #include "base/prefs/pref_service.h"
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 // It is safe to access the default profile here. 637 // It is safe to access the default profile here.
637 - (void)applicationDidFinishLaunching:(NSNotification*)notify { 638 - (void)applicationDidFinishLaunching:(NSNotification*)notify {
638 // Notify BrowserList to keep the application running so it doesn't go away 639 // Notify BrowserList to keep the application running so it doesn't go away
639 // when all the browser windows get closed. 640 // when all the browser windows get closed.
640 chrome::StartKeepAlive(); 641 chrome::StartKeepAlive();
641 642
642 [self setUpdateCheckInterval]; 643 [self setUpdateCheckInterval];
643 644
644 // Start managing the menu for app windows. This needs to be done here because 645 // Start managing the menu for app windows. This needs to be done here because
645 // main menu item titles are not yet initialized in awakeFromNib. 646 // main menu item titles are not yet initialized in awakeFromNib.
646 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableAppShims)) 647 if (apps::IsAppShimsEnabled())
647 appShimMenuController_.reset([[AppShimMenuController alloc] init]); 648 appShimMenuController_.reset([[AppShimMenuController alloc] init]);
648 649
649 // Build up the encoding menu, the order of the items differs based on the 650 // Build up the encoding menu, the order of the items differs based on the
650 // current locale (see http://crbug.com/7647 for details). 651 // current locale (see http://crbug.com/7647 for details).
651 // We need a valid g_browser_process to get the profile which is why we can't 652 // We need a valid g_browser_process to get the profile which is why we can't
652 // call this from awakeFromNib. 653 // call this from awakeFromNib.
653 NSMenu* viewMenu = [[[NSApp mainMenu] itemWithTag:IDC_VIEW_MENU] submenu]; 654 NSMenu* viewMenu = [[[NSApp mainMenu] itemWithTag:IDC_VIEW_MENU] submenu];
654 NSMenuItem* encodingMenuItem = [viewMenu itemWithTag:IDC_ENCODING_MENU]; 655 NSMenuItem* encodingMenuItem = [viewMenu itemWithTag:IDC_ENCODING_MENU];
655 NSMenu* encodingMenu = [encodingMenuItem submenu]; 656 NSMenu* encodingMenu = [encodingMenuItem submenu];
656 EncodingMenuControllerDelegate::BuildEncodingMenu([self lastProfile], 657 EncodingMenuControllerDelegate::BuildEncodingMenu([self lastProfile],
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
1416 1417
1417 //--------------------------------------------------------------------------- 1418 //---------------------------------------------------------------------------
1418 1419
1419 namespace app_controller_mac { 1420 namespace app_controller_mac {
1420 1421
1421 bool IsOpeningNewWindow() { 1422 bool IsOpeningNewWindow() {
1422 return g_is_opening_new_window; 1423 return g_is_opening_new_window;
1423 } 1424 }
1424 1425
1425 } // namespace app_controller_mac 1426 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698