Chromium Code Reviews| Index: content/app/content_main_runner.cc |
| diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc |
| index a8235c3385d328c78da00f783be8f4a31ded2936..96514478c4644e750e96f38a48ca65338aa0f5bd 100644 |
| --- a/content/app/content_main_runner.cc |
| +++ b/content/app/content_main_runner.cc |
| @@ -68,6 +68,7 @@ |
| #include "content/browser/gpu/gpu_process_host.h" |
| #include "content/browser/renderer_host/render_process_host_impl.h" |
| #include "content/browser/utility_process_host_impl.h" |
| +#include "content/public/gpu/content_gpu_client.h" |
| #include "content/public/plugin/content_plugin_client.h" |
| #include "content/public/renderer/content_renderer_client.h" |
| #include "content/public/utility/content_utility_client.h" |
| @@ -131,6 +132,8 @@ base::LazyInstance<ContentBrowserClient> |
| #endif // !CHROME_MULTIPLE_DLL_CHILD |
| #if !defined(OS_IOS) && !defined(CHROME_MULTIPLE_DLL_BROWSER) |
| +base::LazyInstance<ContentGpuClient> g_empty_content_gpu_client = |
|
jam
2016/01/28 16:47:36
nit: follow the rest of the lines and indent g_emp
kcwu
2016/01/29 17:22:44
Done.
|
| + LAZY_INSTANCE_INITIALIZER; |
| base::LazyInstance<ContentPluginClient> |
| g_empty_content_plugin_client = LAZY_INSTANCE_INITIALIZER; |
| base::LazyInstance<ContentRendererClient> |
| @@ -212,6 +215,15 @@ class ContentClientInitializer { |
| #endif // !CHROME_MULTIPLE_DLL_CHILD |
| #if !defined(OS_IOS) && !defined(CHROME_MULTIPLE_DLL_BROWSER) |
| + if (process_type == switches::kGpuProcess || |
| + base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kSingleProcess)) { |
| + if (delegate) |
| + content_client->gpu_ = delegate->CreateContentGpuClient(); |
| + if (!content_client->gpu_) |
| + content_client->gpu_ = &g_empty_content_gpu_client.Get(); |
| + } |
| + |
| if (process_type == switches::kPluginProcess || |
| process_type == switches::kPpapiPluginProcess) { |
| if (delegate) |