summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-23 15:33:38 +0000
committerscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-23 15:33:38 +0000
commit57fdef4bdc5be776ecd820c2d39e3047f55d6568 (patch)
tree803d6742ab2fc39f47374542675ae0e0ee67aaba
parent0ec6d3ba8e3940cb578713aa05c969fd17eb75e9 (diff)
downloadchromium_src-57fdef4bdc5be776ecd820c2d39e3047f55d6568.zip
chromium_src-57fdef4bdc5be776ecd820c2d39e3047f55d6568.tar.gz
chromium_src-57fdef4bdc5be776ecd820c2d39e3047f55d6568.tar.bz2
Cut some more dependencies from browser to child for multiple_dll mode
Removes the in-process implementations for Gpu and Utility. R=jam@chromium.org, sky@chromium.org BUG=237249 Review URL: https://codereview.chromium.org/19502003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213126 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/chrome_main_delegate.cc6
-rw-r--r--content/browser/gpu/gpu_process_host.cc9
-rw-r--r--content/browser/gpu/gpu_process_host.h2
-rw-r--r--content/browser/utility_process_host_impl.cc9
-rw-r--r--content/browser/utility_process_host_impl.h2
-rw-r--r--content/content.gyp4
-rw-r--r--ui/views/controls/webview/webview.gyp2
7 files changed, 27 insertions, 7 deletions
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index 4077d3c..10abc01 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -93,19 +93,19 @@
#include "chrome/app/breakpad_linux.h"
#endif
-#if !defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_BROWSER)
+#if !defined(CHROME_MULTIPLE_DLL_CHILD)
base::LazyInstance<chrome::ChromeContentBrowserClient>
g_chrome_content_browser_client = LAZY_INSTANCE_INITIALIZER;
#endif
-#if !defined(CHROME_MULTIPLE_DLL) || defined(CHROME_MULTIPLE_DLL_CHILD)
+#if !defined(CHROME_MULTIPLE_DLL_BROWSER)
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;
-#endif // !CHROME_MULTIPLE_DLL || CHROME_MULTIPLE_DLL_CHILD
+#endif
#if defined(OS_POSIX)
base::LazyInstance<chrome::ChromeBreakpadClient>::Leaky
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 7bf6292..6ab1d3c 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -279,6 +279,8 @@ class GpuSandboxedProcessLauncherDelegate
} // anonymous namespace
+// Single process not supported in multiple dll mode currently.
+#if !defined(CHROME_MULTIPLE_DLL)
// This class creates a GPU thread (instead of a GPU process), when running
// with --in-process-gpu or --single-process.
class GpuMainThread : public base::Thread {
@@ -312,6 +314,7 @@ class GpuMainThread : public base::Thread {
DISALLOW_COPY_AND_ASSIGN(GpuMainThread);
};
+#endif // !CHROME_MULTIPLE_DLL
// static
bool GpuProcessHost::ValidateHost(GpuProcessHost* host) {
@@ -596,6 +599,8 @@ bool GpuProcessHost::Init() {
if (channel_id.empty())
return false;
+ // Single process not supported in multiple dll mode currently.
+#if !defined(CHROME_MULTIPLE_DLL)
if (in_process_) {
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisableGpuWatchdog);
@@ -604,7 +609,9 @@ bool GpuProcessHost::Init() {
in_process_gpu_thread_->Start();
OnProcessLaunched(); // Fake a callback that the process is ready.
- } else if (!LaunchGpuProcess(channel_id)) {
+ } else
+#endif // !CHROME_MULTIPLE_DLL
+ if (!LaunchGpuProcess(channel_id)) {
return false;
}
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
index 7b2f6a8..8908a10 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -214,7 +214,9 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
bool swiftshader_rendering_;
GpuProcessKind kind_;
+#if !defined(CHROME_MULTIPLE_DLL)
scoped_ptr<GpuMainThread> in_process_gpu_thread_;
+#endif
// Whether we actually launched a GPU process.
bool process_launched_;
diff --git a/content/browser/utility_process_host_impl.cc b/content/browser/utility_process_host_impl.cc
index 6e9dfa7..db062c5 100644
--- a/content/browser/utility_process_host_impl.cc
+++ b/content/browser/utility_process_host_impl.cc
@@ -58,6 +58,8 @@ private:
// are many globals used in the utility process.
static base::LazyInstance<base::Lock> g_one_utility_thread_lock;
+// Single process not supported in multiple dll mode currently.
+#if !defined(CHROME_MULTIPLE_DLL)
class UtilityMainThread : public base::Thread {
public:
UtilityMainThread(const std::string& channel_id)
@@ -98,6 +100,7 @@ class UtilityMainThread : public base::Thread {
DISALLOW_COPY_AND_ASSIGN(UtilityMainThread);
};
+#endif // !CHROME_MULTIPLE_DLL
UtilityProcessHost* UtilityProcessHost::Create(
UtilityProcessHostClient* client,
@@ -193,12 +196,16 @@ bool UtilityProcessHostImpl::StartProcess() {
if (channel_id.empty())
return false;
+ // Single process not supported in multiple dll mode currently.
+#if !defined(CHROME_MULTIPLE_DLL)
if (RenderProcessHost::run_renderer_in_process()) {
// See comment in RenderProcessHostImpl::Init() for the background on why we
// support single process mode this way.
in_process_thread_.reset(new UtilityMainThread(channel_id));
in_process_thread_->Start();
- } else {
+ } else
+#endif // !CHROME_MULTIPLE_DLL
+ {
const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
int child_flags = child_flags_;
diff --git a/content/browser/utility_process_host_impl.h b/content/browser/utility_process_host_impl.h
index 45d2b3f..6eecd3d 100644
--- a/content/browser/utility_process_host_impl.h
+++ b/content/browser/utility_process_host_impl.h
@@ -83,8 +83,10 @@ class CONTENT_EXPORT UtilityProcessHostImpl
scoped_ptr<BrowserChildProcessHostImpl> process_;
+#if !defined(CHROME_MULTIPLE_DLL)
// Used in single-process mode instead of process_.
scoped_ptr<UtilityMainThread> in_process_thread_;
+#endif
DISALLOW_COPY_AND_ASSIGN(UtilityProcessHostImpl);
};
diff --git a/content/content.gyp b/content/content.gyp
index f938e36..4234a03 100644
--- a/content/content.gyp
+++ b/content/content.gyp
@@ -112,7 +112,7 @@
'content_resources.gyp:content_resources',
],
'conditions': [
- ['OS != "ios"', {
+ ['OS != "ios" and chrome_multiple_dll != 1', {
'dependencies': [
'content_gpu',
'content_utility',
@@ -172,6 +172,7 @@
'content_gpu.gypi',
],
'dependencies': [
+ 'content_child',
'content_common',
],
},
@@ -225,6 +226,7 @@
'content_utility.gypi',
],
'dependencies': [
+ 'content_child',
'content_common',
],
},
diff --git a/ui/views/controls/webview/webview.gyp b/ui/views/controls/webview/webview.gyp
index 25cb11a..1814d2f 100644
--- a/ui/views/controls/webview/webview.gyp
+++ b/ui/views/controls/webview/webview.gyp
@@ -14,7 +14,7 @@
'../../../../base/base.gyp:base',
'../../../../base/base.gyp:base_i18n',
'../../../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '../../../../content/content.gyp:content',
+ '../../../../content/content.gyp:content_browser',
'../../../../skia/skia.gyp:skia',
'../../../../url/url.gyp:url_lib',
'../../../ui.gyp:ui',