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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 #if !defined(DISABLE_NACL) | 113 #if !defined(DISABLE_NACL) |
114 #include "components/nacl/common/nacl_switches.h" | 114 #include "components/nacl/common/nacl_switches.h" |
115 #include "components/nacl/renderer/plugin/ppapi_entrypoints.h" | 115 #include "components/nacl/renderer/plugin/ppapi_entrypoints.h" |
116 #endif | 116 #endif |
117 | 117 |
118 #if defined(ENABLE_REMOTING) | 118 #if defined(ENABLE_REMOTING) |
119 #include "remoting/client/plugin/pepper_entrypoints.h" | 119 #include "remoting/client/plugin/pepper_entrypoints.h" |
120 #endif | 120 #endif |
121 | 121 |
122 #if !defined(CHROME_MULTIPLE_DLL_CHILD) | 122 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) |
123 base::LazyInstance<chrome::ChromeContentBrowserClient> | 123 #include "chrome/child/pdf_child_init.h" |
124 g_chrome_content_browser_client = LAZY_INSTANCE_INITIALIZER; | |
125 #endif | |
126 | 124 |
127 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) | |
128 base::LazyInstance<ChromeContentRendererClient> | 125 base::LazyInstance<ChromeContentRendererClient> |
129 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; | 126 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; |
130 base::LazyInstance<ChromeContentUtilityClient> | 127 base::LazyInstance<ChromeContentUtilityClient> |
131 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; | 128 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; |
132 base::LazyInstance<chrome::ChromeContentPluginClient> | 129 base::LazyInstance<chrome::ChromeContentPluginClient> |
133 g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER; | 130 g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER; |
134 #endif | 131 #endif |
135 | 132 |
| 133 #if !defined(CHROME_MULTIPLE_DLL_CHILD) |
| 134 base::LazyInstance<chrome::ChromeContentBrowserClient> |
| 135 g_chrome_content_browser_client = LAZY_INSTANCE_INITIALIZER; |
| 136 #endif |
| 137 |
136 #if defined(OS_POSIX) | 138 #if defined(OS_POSIX) |
137 base::LazyInstance<chrome::ChromeCrashReporterClient>::Leaky | 139 base::LazyInstance<chrome::ChromeCrashReporterClient>::Leaky |
138 g_chrome_crash_client = LAZY_INSTANCE_INITIALIZER; | 140 g_chrome_crash_client = LAZY_INSTANCE_INITIALIZER; |
139 #endif | 141 #endif |
140 | 142 |
141 extern int NaClMain(const content::MainFunctionParams&); | 143 extern int NaClMain(const content::MainFunctionParams&); |
142 extern int ServiceProcessMain(const content::MainFunctionParams&); | 144 extern int ServiceProcessMain(const content::MainFunctionParams&); |
143 | 145 |
144 namespace { | 146 namespace { |
145 | 147 |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 resources_pack_path, ui::SCALE_FACTOR_NONE); | 770 resources_pack_path, ui::SCALE_FACTOR_NONE); |
769 #endif | 771 #endif |
770 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << | 772 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << |
771 locale; | 773 locale; |
772 | 774 |
773 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) | 775 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) |
774 if (process_type == switches::kUtilityProcess || | 776 if (process_type == switches::kUtilityProcess || |
775 process_type == switches::kZygoteProcess) { | 777 process_type == switches::kZygoteProcess) { |
776 ChromeContentUtilityClient::PreSandboxStartup(); | 778 ChromeContentUtilityClient::PreSandboxStartup(); |
777 } | 779 } |
| 780 |
| 781 chrome::InitializePDF(); |
778 #endif | 782 #endif |
779 } | 783 } |
780 | 784 |
781 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 785 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
782 // Zygote needs to call InitCrashReporter() in RunZygote(). | 786 // Zygote needs to call InitCrashReporter() in RunZygote(). |
783 if (process_type != switches::kZygoteProcess) { | 787 if (process_type != switches::kZygoteProcess) { |
784 #if defined(OS_ANDROID) | 788 #if defined(OS_ANDROID) |
785 if (process_type.empty()) | 789 if (process_type.empty()) |
786 breakpad::InitCrashReporter(process_type); | 790 breakpad::InitCrashReporter(process_type); |
787 else | 791 else |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 } | 967 } |
964 | 968 |
965 content::ContentUtilityClient* | 969 content::ContentUtilityClient* |
966 ChromeMainDelegate::CreateContentUtilityClient() { | 970 ChromeMainDelegate::CreateContentUtilityClient() { |
967 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 971 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
968 return NULL; | 972 return NULL; |
969 #else | 973 #else |
970 return g_chrome_content_utility_client.Pointer(); | 974 return g_chrome_content_utility_client.Pointer(); |
971 #endif | 975 #endif |
972 } | 976 } |
OLD | NEW |