| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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 #include "chrome/browser/browser_main.h" | 5 #include "chrome/browser/browser_main.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "app/app_switches.h" |
| 10 #include "app/l10n_util_mac.h" |
| 9 #include "app/resource_bundle.h" | 11 #include "app/resource_bundle.h" |
| 10 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 11 #include "base/debug_util.h" | 13 #include "base/debug_util.h" |
| 12 #include "chrome/app/breakpad_mac.h" | 14 #include "chrome/app/breakpad_mac.h" |
| 13 #import "chrome/app/keystone_glue.h" | 15 #import "chrome/app/keystone_glue.h" |
| 14 #import "chrome/browser/app_controller_mac.h" | 16 #import "chrome/browser/app_controller_mac.h" |
| 15 #include "chrome/browser/browser_main_win.h" | 17 #include "chrome/browser/browser_main_win.h" |
| 16 #import "chrome/browser/chrome_browser_application_mac.h" | 18 #import "chrome/browser/chrome_browser_application_mac.h" |
| 17 #include "chrome/browser/metrics/metrics_service.h" | 19 #include "chrome/browser/metrics/metrics_service.h" |
| 18 #include "chrome/common/main_function_params.h" | 20 #include "chrome/common/main_function_params.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 32 [BrowserCrApplication sharedApplication]; | 34 [BrowserCrApplication sharedApplication]; |
| 33 | 35 |
| 34 // Before we load the nib, we need to start up the resource bundle so we have | 36 // Before we load the nib, we need to start up the resource bundle so we have |
| 35 // the strings avaiable for localization. | 37 // the strings avaiable for localization. |
| 36 if (!parameters.ui_task) { | 38 if (!parameters.ui_task) { |
| 37 ResourceBundle::InitSharedInstance(std::wstring()); | 39 ResourceBundle::InitSharedInstance(std::wstring()); |
| 38 } | 40 } |
| 39 // Now load the nib. | 41 // Now load the nib. |
| 40 [NSBundle loadNibNamed:@"MainMenu" owner:NSApp]; | 42 [NSBundle loadNibNamed:@"MainMenu" owner:NSApp]; |
| 41 | 43 |
| 44 // The browser process only wants to support the language Cocoa will use, so |
| 45 // force the app locale to be overriden with that value. |
| 46 l10n_util::OverrideLocaleWithCocoaLocale(); |
| 47 |
| 42 // This is a no-op if the KeystoneRegistration framework is not present. | 48 // This is a no-op if the KeystoneRegistration framework is not present. |
| 43 // The framework is only distributed with branded Google Chrome builds. | 49 // The framework is only distributed with branded Google Chrome builds. |
| 44 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; | 50 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; |
| 45 } | 51 } |
| 46 | 52 |
| 47 void DidEndMainMessageLoop() { | 53 void DidEndMainMessageLoop() { |
| 48 AppController* appController = [NSApp delegate]; | 54 AppController* appController = [NSApp delegate]; |
| 49 [appController didEndMainMessageLoop]; | 55 [appController didEndMainMessageLoop]; |
| 50 } | 56 } |
| 51 | 57 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 73 int HandleIconsCommands(const CommandLine& parsed_command_line) { | 79 int HandleIconsCommands(const CommandLine& parsed_command_line) { |
| 74 return 0; | 80 return 0; |
| 75 } | 81 } |
| 76 | 82 |
| 77 bool CheckMachineLevelInstall() { | 83 bool CheckMachineLevelInstall() { |
| 78 return false; | 84 return false; |
| 79 } | 85 } |
| 80 | 86 |
| 81 void PrepareRestartOnCrashEnviroment(const CommandLine& parsed_command_line) { | 87 void PrepareRestartOnCrashEnviroment(const CommandLine& parsed_command_line) { |
| 82 } | 88 } |
| OLD | NEW |