Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: chrome/app/chrome_main_delegate.cc

Issue 17619005: Create top-level separate targets for browser and child dlls (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/common.gypi ('k') | chrome/app/client_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_main_delegate.cc
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index fb0ab3a533ca1542ca0d7da557bd6685c4727677..1cb8238f1962d5c6a6763ac46c2829d50d004302 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -93,14 +93,17 @@
#include "chrome/app/breakpad_linux.h"
#endif
-base::LazyInstance<chrome::ChromeContentBrowserClient>
- g_chrome_content_browser_client = LAZY_INSTANCE_INITIALIZER;
+#if !defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_CHILD)
base::LazyInstance<chrome::ChromeContentRendererClient>
g_chrome_content_renderer_client = LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<chrome::ChromeContentUtilityClient>
g_chrome_content_utility_client = LAZY_INSTANCE_INITIALIZER;
base::LazyInstance<chrome::ChromeContentPluginClient>
g_chrome_content_plugin_client = LAZY_INSTANCE_INITIALIZER;
+#else // In browser in multiple DLL mode.
+base::LazyInstance<chrome::ChromeContentBrowserClient>
+ g_chrome_content_browser_client = LAZY_INSTANCE_INITIALIZER;
+#endif
#if defined(OS_POSIX)
base::LazyInstance<chrome::ChromeBreakpadClient>::Leaky
@@ -388,7 +391,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exit_code) {
// not though: it still uses string16. As there is no easily accessible command
// line on Android, I'm not sure this is a big deal, at least for purposes of
// troubleshooting with a customer.
-#if !defined(OS_ANDROID)
+#if !defined(OS_ANDROID) && !defined(CHROME_MULTIPLE_DLL_CHILD)
// If we are in diagnostics mode this is the end of the line: after the
// diagnostics are run the process will invariably exit.
if (command_line.HasSwitch(switches::kDiagnostics)) {
@@ -673,15 +676,17 @@ int ChromeMainDelegate::RunProcess(
const content::MainFunctionParams& main_function_params) {
// ANDROID doesn't support "service", so no ServiceProcessMain, and arraysize
// doesn't support empty array. So we comment out the block for Android.
-#if !defined(OS_ANDROID)
+#if !defined(OS_ANDROID) && \
+ (!defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_BROWSER))
static const MainFunction kMainFunctions[] = {
{ switches::kServiceProcess, ServiceProcessMain },
#if defined(OS_MACOSX)
{ switches::kRelauncherProcess,
mac_relauncher::internal::RelauncherMain },
#endif
- // TODO(scottmg): http://crbug.com/237249 NaCl -> child.
-#if !defined(DISABLE_NACL)
+
+#if !defined(DISABLE_NACL) && \
+ (!defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_CHILD))
{ switches::kNaClLoaderProcess, NaClMain },
#endif // DISABLE_NACL
};
@@ -749,23 +754,46 @@ void ChromeMainDelegate::ZygoteForked() {
#endif // OS_MACOSX
+#if !defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_CHILD)
+
+content::ContentPluginClient* ChromeMainDelegate::CreateContentPluginClient() {
+ return &g_chrome_content_plugin_client.Get();
+}
+
+content::ContentRendererClient*
+ChromeMainDelegate::CreateContentRendererClient() {
+ return &g_chrome_content_renderer_client.Get();
+}
+
+content::ContentUtilityClient*
+ChromeMainDelegate::CreateContentUtilityClient() {
+ return &g_chrome_content_utility_client.Get();
+}
+
+content::ContentBrowserClient*
+ChromeMainDelegate::CreateContentBrowserClient() {
+ return NULL;
+}
+
+#else // In browser in multiple DLL mode.
+
content::ContentBrowserClient*
ChromeMainDelegate::CreateContentBrowserClient() {
return &g_chrome_content_browser_client.Get();
}
content::ContentPluginClient* ChromeMainDelegate::CreateContentPluginClient() {
- // TODO(scottmg): http://crbug.com/237249 This will have to be split out into
- // browser and child parts.
- return &g_chrome_content_plugin_client.Get();
+ return NULL;
}
content::ContentRendererClient*
- ChromeMainDelegate::CreateContentRendererClient() {
- return &g_chrome_content_renderer_client.Get();
+ChromeMainDelegate::CreateContentRendererClient() {
+ return NULL;
}
content::ContentUtilityClient*
- ChromeMainDelegate::CreateContentUtilityClient() {
- return &g_chrome_content_utility_client.Get();
+ChromeMainDelegate::CreateContentUtilityClient() {
+ return NULL;
}
+
+#endif
« no previous file with comments | « build/common.gypi ('k') | chrome/app/client_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698