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(ENABLE_PLUGINS) && (defined(CHROME_MULTIPLE_DLL_CHILD) || \ | |
123 !defined(CHROME_MULTIPLE_DLL_BROWSER)) | |
124 #include "pdf/pdf.h" | |
125 #endif | |
126 | |
127 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) | 122 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) |
128 #include "chrome/child/pdf_child_init.h" | 123 #include "chrome/child/pdf_child_init.h" |
129 | 124 |
130 base::LazyInstance<ChromeContentRendererClient> | 125 base::LazyInstance<ChromeContentRendererClient> |
131 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; | 126 g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER; |
132 base::LazyInstance<ChromeContentUtilityClient> | 127 base::LazyInstance<ChromeContentUtilityClient> |
133 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; | 128 g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER; |
134 base::LazyInstance<chrome::ChromeContentPluginClient> | 129 base::LazyInstance<chrome::ChromeContentPluginClient> |
135 g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER; | 130 g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER; |
136 #endif | 131 #endif |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 remoting::PPP_GetInterface, | 819 remoting::PPP_GetInterface, |
825 remoting::PPP_InitializeModule, | 820 remoting::PPP_InitializeModule, |
826 remoting::PPP_ShutdownModule); | 821 remoting::PPP_ShutdownModule); |
827 #endif | 822 #endif |
828 #if !defined(DISABLE_NACL) | 823 #if !defined(DISABLE_NACL) |
829 ChromeContentClient::SetNaClEntryFunctions( | 824 ChromeContentClient::SetNaClEntryFunctions( |
830 nacl_plugin::PPP_GetInterface, | 825 nacl_plugin::PPP_GetInterface, |
831 nacl_plugin::PPP_InitializeModule, | 826 nacl_plugin::PPP_InitializeModule, |
832 nacl_plugin::PPP_ShutdownModule); | 827 nacl_plugin::PPP_ShutdownModule); |
833 #endif | 828 #endif |
834 #if defined(ENABLE_PLUGINS) | |
835 ChromeContentClient::SetPDFEntryFunctions( | |
836 chrome_pdf::PPP_GetInterface, | |
837 chrome_pdf::PPP_InitializeModule, | |
838 chrome_pdf::PPP_ShutdownModule); | |
839 #endif | |
840 #endif | 829 #endif |
841 } | 830 } |
842 | 831 |
843 int ChromeMainDelegate::RunProcess( | 832 int ChromeMainDelegate::RunProcess( |
844 const std::string& process_type, | 833 const std::string& process_type, |
845 const content::MainFunctionParams& main_function_params) { | 834 const content::MainFunctionParams& main_function_params) { |
846 // ANDROID doesn't support "service", so no ServiceProcessMain, and arraysize | 835 // ANDROID doesn't support "service", so no ServiceProcessMain, and arraysize |
847 // doesn't support empty array. So we comment out the block for Android. | 836 // doesn't support empty array. So we comment out the block for Android. |
848 #if !defined(OS_ANDROID) | 837 #if !defined(OS_ANDROID) |
849 static const MainFunction kMainFunctions[] = { | 838 static const MainFunction kMainFunctions[] = { |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 } | 967 } |
979 | 968 |
980 content::ContentUtilityClient* | 969 content::ContentUtilityClient* |
981 ChromeMainDelegate::CreateContentUtilityClient() { | 970 ChromeMainDelegate::CreateContentUtilityClient() { |
982 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 971 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
983 return NULL; | 972 return NULL; |
984 #else | 973 #else |
985 return g_chrome_content_utility_client.Pointer(); | 974 return g_chrome_content_utility_client.Pointer(); |
986 #endif | 975 #endif |
987 } | 976 } |
OLD | NEW |