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

Side by Side Diff: content/app/content_main_runner.cc

Issue 1856963002: Remove content/public/plugin and chrome/plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_03_content_child_npapi
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « content/BUILD.gn ('k') | content/content_plugin.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <string> 10 #include <string>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "content/public/app/content_main.h" 49 #include "content/public/app/content_main.h"
50 #include "content/public/app/content_main_delegate.h" 50 #include "content/public/app/content_main_delegate.h"
51 #include "content/public/browser/content_browser_client.h" 51 #include "content/public/browser/content_browser_client.h"
52 #include "content/public/common/content_client.h" 52 #include "content/public/common/content_client.h"
53 #include "content/public/common/content_constants.h" 53 #include "content/public/common/content_constants.h"
54 #include "content/public/common/content_paths.h" 54 #include "content/public/common/content_paths.h"
55 #include "content/public/common/content_switches.h" 55 #include "content/public/common/content_switches.h"
56 #include "content/public/common/main_function_params.h" 56 #include "content/public/common/main_function_params.h"
57 #include "content/public/common/sandbox_init.h" 57 #include "content/public/common/sandbox_init.h"
58 #include "content/public/gpu/content_gpu_client.h" 58 #include "content/public/gpu/content_gpu_client.h"
59 #include "content/public/plugin/content_plugin_client.h"
60 #include "content/public/renderer/content_renderer_client.h" 59 #include "content/public/renderer/content_renderer_client.h"
61 #include "content/public/utility/content_utility_client.h" 60 #include "content/public/utility/content_utility_client.h"
62 #include "content/renderer/in_process_renderer_thread.h" 61 #include "content/renderer/in_process_renderer_thread.h"
63 #include "content/utility/in_process_utility_thread.h" 62 #include "content/utility/in_process_utility_thread.h"
64 #include "ipc/ipc_descriptors.h" 63 #include "ipc/ipc_descriptors.h"
65 #include "ipc/ipc_switches.h" 64 #include "ipc/ipc_switches.h"
66 #include "media/base/media.h" 65 #include "media/base/media.h"
67 #include "sandbox/win/src/sandbox_types.h" 66 #include "sandbox/win/src/sandbox_types.h"
68 #include "ui/base/ui_base_paths.h" 67 #include "ui/base/ui_base_paths.h"
69 #include "ui/base/ui_base_switches.h" 68 #include "ui/base/ui_base_switches.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 namespace content { 125 namespace content {
127 126
128 #if !defined(CHROME_MULTIPLE_DLL_CHILD) 127 #if !defined(CHROME_MULTIPLE_DLL_CHILD)
129 base::LazyInstance<ContentBrowserClient> 128 base::LazyInstance<ContentBrowserClient>
130 g_empty_content_browser_client = LAZY_INSTANCE_INITIALIZER; 129 g_empty_content_browser_client = LAZY_INSTANCE_INITIALIZER;
131 #endif // !CHROME_MULTIPLE_DLL_CHILD 130 #endif // !CHROME_MULTIPLE_DLL_CHILD
132 131
133 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) 132 #if !defined(CHROME_MULTIPLE_DLL_BROWSER)
134 base::LazyInstance<ContentGpuClient> 133 base::LazyInstance<ContentGpuClient>
135 g_empty_content_gpu_client = LAZY_INSTANCE_INITIALIZER; 134 g_empty_content_gpu_client = LAZY_INSTANCE_INITIALIZER;
136 base::LazyInstance<ContentPluginClient>
137 g_empty_content_plugin_client = LAZY_INSTANCE_INITIALIZER;
138 base::LazyInstance<ContentRendererClient> 135 base::LazyInstance<ContentRendererClient>
139 g_empty_content_renderer_client = LAZY_INSTANCE_INITIALIZER; 136 g_empty_content_renderer_client = LAZY_INSTANCE_INITIALIZER;
140 base::LazyInstance<ContentUtilityClient> 137 base::LazyInstance<ContentUtilityClient>
141 g_empty_content_utility_client = LAZY_INSTANCE_INITIALIZER; 138 g_empty_content_utility_client = LAZY_INSTANCE_INITIALIZER;
142 #endif // !CHROME_MULTIPLE_DLL_BROWSER 139 #endif // !CHROME_MULTIPLE_DLL_BROWSER
143 140
144 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) && defined(OS_ANDROID) 141 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) && defined(OS_ANDROID)
145 #if defined __LP64__ 142 #if defined __LP64__
146 #define kV8NativesDataDescriptor kV8NativesDataDescriptor64 143 #define kV8NativesDataDescriptor kV8NativesDataDescriptor64
147 #define kV8SnapshotDataDescriptor kV8SnapshotDataDescriptor64 144 #define kV8SnapshotDataDescriptor kV8SnapshotDataDescriptor64
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) 226 #if !defined(CHROME_MULTIPLE_DLL_BROWSER)
230 if (process_type == switches::kGpuProcess || 227 if (process_type == switches::kGpuProcess ||
231 base::CommandLine::ForCurrentProcess()->HasSwitch( 228 base::CommandLine::ForCurrentProcess()->HasSwitch(
232 switches::kSingleProcess)) { 229 switches::kSingleProcess)) {
233 if (delegate) 230 if (delegate)
234 content_client->gpu_ = delegate->CreateContentGpuClient(); 231 content_client->gpu_ = delegate->CreateContentGpuClient();
235 if (!content_client->gpu_) 232 if (!content_client->gpu_)
236 content_client->gpu_ = &g_empty_content_gpu_client.Get(); 233 content_client->gpu_ = &g_empty_content_gpu_client.Get();
237 } 234 }
238 235
239 if (process_type == switches::kPluginProcess || 236 if (process_type == switches::kRendererProcess ||
240 process_type == switches::kPpapiPluginProcess) { 237 base::CommandLine::ForCurrentProcess()->HasSwitch(
241 if (delegate) 238 switches::kSingleProcess)) {
242 content_client->plugin_ = delegate->CreateContentPluginClient();
243 if (!content_client->plugin_)
244 content_client->plugin_ = &g_empty_content_plugin_client.Get();
245 // Single process not supported in split dll mode.
246 } else if (process_type == switches::kRendererProcess ||
247 base::CommandLine::ForCurrentProcess()->HasSwitch(
248 switches::kSingleProcess)) {
249 if (delegate) 239 if (delegate)
250 content_client->renderer_ = delegate->CreateContentRendererClient(); 240 content_client->renderer_ = delegate->CreateContentRendererClient();
251 if (!content_client->renderer_) 241 if (!content_client->renderer_)
252 content_client->renderer_ = &g_empty_content_renderer_client.Get(); 242 content_client->renderer_ = &g_empty_content_renderer_client.Get();
253 } 243 }
254 244
255 if (process_type == switches::kUtilityProcess || 245 if (process_type == switches::kUtilityProcess ||
256 base::CommandLine::ForCurrentProcess()->HasSwitch( 246 base::CommandLine::ForCurrentProcess()->HasSwitch(
257 switches::kSingleProcess)) { 247 switches::kSingleProcess)) {
258 if (delegate) 248 if (delegate)
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 797
808 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 798 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
809 }; 799 };
810 800
811 // static 801 // static
812 ContentMainRunner* ContentMainRunner::Create() { 802 ContentMainRunner* ContentMainRunner::Create() {
813 return new ContentMainRunnerImpl(); 803 return new ContentMainRunnerImpl();
814 } 804 }
815 805
816 } // namespace content 806 } // namespace content
OLDNEW
« no previous file with comments | « content/BUILD.gn ('k') | content/content_plugin.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698