diff options
author | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 00:14:17 +0000 |
---|---|---|
committer | scottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-08 00:14:17 +0000 |
commit | 0a999393b6ff0b45e70ad14e3c3e637da5ec8119 (patch) | |
tree | 5196baa57b53c61cbb8f949212758e000e91e8c3 /content | |
parent | 1d2d5a40c5db4efc968e74bfb0baf49c8a6e3adc (diff) | |
download | chromium_src-0a999393b6ff0b45e70ad14e3c3e637da5ec8119.zip chromium_src-0a999393b6ff0b45e70ad14e3c3e637da5ec8119.tar.gz chromium_src-0a999393b6ff0b45e70ad14e3c3e637da5ec8119.tar.bz2 |
Add chrome_split_dll gyp variable, and duplicate chrome_main_dll target
Currently contains chrome_browser_dll target. Removes some paths from browser->webcore
via content that are there due to single process mode, and removes dependency of content
on content_renderer.
Current remaining paths from chrome_browser_dll to webcore: http://i.imgur.com/7WWRvpA.jpg
R=cpu@chromium.org
BUG=237249
Review URL: https://chromiumcodereview.appspot.com/14682014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198834 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/app/content_main_runner.cc | 22 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host_impl.cc | 6 | ||||
-rw-r--r-- | content/content.gyp | 9 | ||||
-rw-r--r-- | content/public/app/content_main_delegate.cc | 6 |
4 files changed, 36 insertions, 7 deletions
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc index 9f1947a..ed490eb 100644 --- a/content/app/content_main_runner.cc +++ b/content/app/content_main_runner.cc @@ -165,7 +165,8 @@ namespace content { base::LazyInstance<ContentBrowserClient> g_empty_content_browser_client = LAZY_INSTANCE_INITIALIZER; -#if !defined(OS_IOS) +// TODO(scottmg): http://crbug.com/237249 Split into browser and child. +#if !defined(OS_IOS) && !defined(CHROME_SPLIT_DLL) base::LazyInstance<ContentPluginClient> g_empty_content_plugin_client = LAZY_INSTANCE_INITIALIZER; base::LazyInstance<ContentRendererClient> @@ -297,8 +298,13 @@ class ContentClientInitializer { process_type == switches::kPpapiPluginProcess) { if (delegate) content_client->plugin_ = delegate->CreateContentPluginClient(); + // TODO(scottmg): http://crbug.com/237249 Should be in _child. +#if !defined(CHROME_SPLIT_DLL) if (!content_client->plugin_) content_client->plugin_ = &g_empty_content_plugin_client.Get(); +#endif + // Single process not supported in split dll mode. +#if !defined(CHROME_SPLIT_DLL) } else if (process_type == switches::kRendererProcess || CommandLine::ForCurrentProcess()->HasSwitch( switches::kSingleProcess)) { @@ -306,11 +312,15 @@ class ContentClientInitializer { content_client->renderer_ = delegate->CreateContentRendererClient(); if (!content_client->renderer_) content_client->renderer_ = &g_empty_content_renderer_client.Get(); +#endif } else if (process_type == switches::kUtilityProcess) { if (delegate) content_client->utility_ = delegate->CreateContentUtilityClient(); + // TODO(scottmg): http://crbug.com/237249 Should be in _child. +#if !defined(CHROME_SPLIT_DLL) if (!content_client->utility_) content_client->utility_ = &g_empty_content_utility_client.Get(); +#endif } #endif // !OS_IOS } @@ -401,14 +411,22 @@ int RunNamedProcessTypeMain( ContentMainDelegate* delegate) { static const MainFunction kMainFunctions[] = { { "", BrowserMain }, - { switches::kRendererProcess, RendererMain }, #if defined(ENABLE_PLUGINS) + // TODO(scottmg): http://crbug.com/237249 This will have to be split into + // content_main_runner_browser and content_main_runner_child. +#if !defined(CHROME_SPLIT_DLL) { switches::kPluginProcess, PluginMain }, { switches::kWorkerProcess, WorkerMain }, +#endif { switches::kPpapiPluginProcess, PpapiPluginMain }, { switches::kPpapiBrokerProcess, PpapiBrokerMain }, #endif + // TODO(scottmg): http://crbug.com/237249 This will have to be split into + // content_main_runner_browser and content_main_runner_child. +#if !defined(CHROME_SPLIT_DLL) { switches::kUtilityProcess, UtilityMain }, + { switches::kRendererProcess, RendererMain }, +#endif { switches::kGpuProcess, GpuMain }, }; diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 51d9298..2e7bba8 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -496,6 +496,8 @@ bool RenderProcessHostImpl::Init() { CreateMessageFilters(); + // Single-process mode not supported in split-dll mode. +#if !defined(CHROME_SPLIT_DLL) if (run_renderer_in_process()) { // Crank up a thread and run the initialization there. With the way that // messages flow between the browser and renderer, this thread is required @@ -517,7 +519,9 @@ bool RenderProcessHostImpl::Init() { in_process_renderer_->StartWithOptions(options); OnProcessLaunched(); // Fake a callback that the process is ready. - } else { + } else +#endif // !CHROME_SPLIT_DLL + { // Build command line for renderer. We call AppendRendererCommandLine() // first so the process type argument will appear first. CommandLine* cmd_line = new CommandLine(renderer_path); diff --git a/content/content.gyp b/content/content.gyp index f790279..ef4a087 100644 --- a/content/content.gyp +++ b/content/content.gyp @@ -64,7 +64,7 @@ 'content_common', ], 'conditions': [ - ['OS != "ios"', { + ['OS != "ios" and chrome_split_dll != 1', { 'dependencies': [ 'content_gpu', 'content_plugin', @@ -99,12 +99,17 @@ 'content_resources.gyp:content_resources', ], 'conditions': [ - ['OS != "ios"', { + ['OS != "ios" and chrome_split_dll != 1', { 'dependencies': [ 'content_gpu', 'content_renderer', ], }], + ['chrome_split_dll', { + 'dependencies': [ + 'content_gpu', + ], + }], ], }, { diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc index a16ac60..a49d7b7 100644 --- a/content/public/app/content_main_delegate.cc +++ b/content/public/app/content_main_delegate.cc @@ -61,7 +61,8 @@ ContentPluginClient* ContentMainDelegate::CreateContentPluginClient() { } ContentRendererClient* ContentMainDelegate::CreateContentRendererClient() { -#if defined(OS_IOS) + // TODO(scottmg): http://crbug.com/237249 Need split for chrome_child.dll. +#if defined(OS_IOS) || defined(CHROME_SPLIT_DLL) return NULL; #else return new ContentRendererClient(); @@ -69,7 +70,8 @@ ContentRendererClient* ContentMainDelegate::CreateContentRendererClient() { } ContentUtilityClient* ContentMainDelegate::CreateContentUtilityClient() { -#if defined(OS_IOS) + // TODO(scottmg): http://crbug.com/237249 Need split for chrome_child.dll. +#if defined(OS_IOS) || defined(CHROME_SPLIT_DLL) return NULL; #else return new ContentUtilityClient(); |