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