OLD | NEW |
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 "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 // We need a valid g_browser_process to get the profile which is why we can't | 574 // We need a valid g_browser_process to get the profile which is why we can't |
575 // call this from awakeFromNib. | 575 // call this from awakeFromNib. |
576 NSMenu* viewMenu = [[[NSApp mainMenu] itemWithTag:IDC_VIEW_MENU] submenu]; | 576 NSMenu* viewMenu = [[[NSApp mainMenu] itemWithTag:IDC_VIEW_MENU] submenu]; |
577 NSMenuItem* encodingMenuItem = [viewMenu itemWithTag:IDC_ENCODING_MENU]; | 577 NSMenuItem* encodingMenuItem = [viewMenu itemWithTag:IDC_ENCODING_MENU]; |
578 NSMenu* encodingMenu = [encodingMenuItem submenu]; | 578 NSMenu* encodingMenu = [encodingMenuItem submenu]; |
579 EncodingMenuControllerDelegate::BuildEncodingMenu([self lastProfile], | 579 EncodingMenuControllerDelegate::BuildEncodingMenu([self lastProfile], |
580 encodingMenu); | 580 encodingMenu); |
581 | 581 |
582 // Since Chrome is localized to more languages than the OS, tell Cocoa which | 582 // Since Chrome is localized to more languages than the OS, tell Cocoa which |
583 // menu is the Help so it can add the search item to it. | 583 // menu is the Help so it can add the search item to it. |
584 if (helpMenu_ && [NSApp respondsToSelector:@selector(setHelpMenu:)]) | 584 [NSApp setHelpMenu:helpMenu_]; |
585 [NSApp setHelpMenu:helpMenu_]; | |
586 | 585 |
587 // Record the path to the (browser) app bundle; this is used by the app mode | 586 // Record the path to the (browser) app bundle; this is used by the app mode |
588 // shim. | 587 // shim. |
589 RecordLastRunAppBundlePath(); | 588 RecordLastRunAppBundlePath(); |
590 | 589 |
591 // Makes "Services" menu items available. | 590 // Makes "Services" menu items available. |
592 [self registerServicesMenuTypesTo:[notify object]]; | 591 [self registerServicesMenuTypesTo:[notify object]]; |
593 | 592 |
594 startupComplete_ = YES; | 593 startupComplete_ = YES; |
595 | 594 |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1308 | 1307 |
1309 } // namespace browser | 1308 } // namespace browser |
1310 | 1309 |
1311 namespace app_controller_mac { | 1310 namespace app_controller_mac { |
1312 | 1311 |
1313 bool IsOpeningNewWindow() { | 1312 bool IsOpeningNewWindow() { |
1314 return g_is_opening_new_window; | 1313 return g_is_opening_new_window; |
1315 } | 1314 } |
1316 | 1315 |
1317 } // namespace app_controller_mac | 1316 } // namespace app_controller_mac |
OLD | NEW |