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