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 #include "chrome/app/chrome_main_delegate.h" | 5 #include "chrome/app/chrome_main_delegate.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 #endif | 110 #endif |
111 | 111 |
112 #if !defined(CHROME_MULTIPLE_DLL_CHILD) | 112 #if !defined(CHROME_MULTIPLE_DLL_CHILD) |
113 base::LazyInstance<chrome::ChromeContentBrowserClient> | 113 base::LazyInstance<chrome::ChromeContentBrowserClient> |
114 g_chrome_content_browser_client = LAZY_INSTANCE_INITIALIZER; | 114 g_chrome_content_browser_client = LAZY_INSTANCE_INITIALIZER; |
115 #endif | 115 #endif |
116 | 116 |
117 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) | 117 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) |
118 base::LazyInstance<ChromeContentRendererClient> | 118 base::LazyInstance<ChromeContentRendererClient> |
119 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; | 119 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; |
120 base::LazyInstance<chrome::ChromeContentUtilityClient> | 120 base::LazyInstance<ChromeContentUtilityClient> |
121 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; | 121 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; |
122 base::LazyInstance<chrome::ChromeContentPluginClient> | 122 base::LazyInstance<chrome::ChromeContentPluginClient> |
123 g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER; | 123 g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER; |
124 #endif | 124 #endif |
125 | 125 |
126 #if defined(OS_POSIX) | 126 #if defined(OS_POSIX) |
127 base::LazyInstance<chrome::ChromeBreakpadClient>::Leaky | 127 base::LazyInstance<chrome::ChromeBreakpadClient>::Leaky |
128 g_chrome_breakpad_client = LAZY_INSTANCE_INITIALIZER; | 128 g_chrome_breakpad_client = LAZY_INSTANCE_INITIALIZER; |
129 #endif | 129 #endif |
130 | 130 |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 754 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
755 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 755 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
756 resources_pack_path, ui::SCALE_FACTOR_NONE); | 756 resources_pack_path, ui::SCALE_FACTOR_NONE); |
757 #endif | 757 #endif |
758 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << | 758 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << |
759 locale; | 759 locale; |
760 | 760 |
761 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) | 761 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) |
762 if (process_type == switches::kUtilityProcess || | 762 if (process_type == switches::kUtilityProcess || |
763 process_type == switches::kZygoteProcess) { | 763 process_type == switches::kZygoteProcess) { |
764 chrome::ChromeContentUtilityClient::PreSandboxStartup(); | 764 ChromeContentUtilityClient::PreSandboxStartup(); |
765 } | 765 } |
766 #endif | 766 #endif |
767 } | 767 } |
768 | 768 |
769 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 769 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
770 // Zygote needs to call InitCrashReporter() in RunZygote(). | 770 // Zygote needs to call InitCrashReporter() in RunZygote(). |
771 if (process_type != switches::kZygoteProcess) { | 771 if (process_type != switches::kZygoteProcess) { |
772 #if defined(OS_ANDROID) | 772 #if defined(OS_ANDROID) |
773 if (process_type.empty()) | 773 if (process_type.empty()) |
774 breakpad::InitCrashReporter(process_type); | 774 breakpad::InitCrashReporter(process_type); |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
918 } | 918 } |
919 | 919 |
920 content::ContentUtilityClient* | 920 content::ContentUtilityClient* |
921 ChromeMainDelegate::CreateContentUtilityClient() { | 921 ChromeMainDelegate::CreateContentUtilityClient() { |
922 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 922 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
923 return NULL; | 923 return NULL; |
924 #else | 924 #else |
925 return g_chrome_content_utility_client.Pointer(); | 925 return g_chrome_content_utility_client.Pointer(); |
926 #endif | 926 #endif |
927 } | 927 } |
OLD | NEW |