OLD | NEW |
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 "base/allocator/allocator_extension.h" | 7 #include "base/allocator/allocator_extension.h" |
8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/debugger.h" | 10 #include "base/debug/debugger.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 static void Set(const std::string& process_type, | 233 static void Set(const std::string& process_type, |
234 ContentMainDelegate* delegate) { | 234 ContentMainDelegate* delegate) { |
235 ContentClient* content_client = GetContentClient(); | 235 ContentClient* content_client = GetContentClient(); |
236 if (process_type.empty()) { | 236 if (process_type.empty()) { |
237 if (delegate) | 237 if (delegate) |
238 content_client->browser_ = delegate->CreateContentBrowserClient(); | 238 content_client->browser_ = delegate->CreateContentBrowserClient(); |
239 if (!content_client->browser_) | 239 if (!content_client->browser_) |
240 content_client->browser_ = &g_empty_content_browser_client.Get(); | 240 content_client->browser_ = &g_empty_content_browser_client.Get(); |
241 } | 241 } |
242 | 242 |
243 if (process_type == switches::kPluginProcess) { | 243 if (process_type == switches::kPluginProcess || |
| 244 process_type == switches::kPpapiPluginProcess) { |
244 if (delegate) | 245 if (delegate) |
245 content_client->plugin_ = delegate->CreateContentPluginClient(); | 246 content_client->plugin_ = delegate->CreateContentPluginClient(); |
246 if (!content_client->plugin_) | 247 if (!content_client->plugin_) |
247 content_client->plugin_ = &g_empty_content_plugin_client.Get(); | 248 content_client->plugin_ = &g_empty_content_plugin_client.Get(); |
248 } else if (process_type == switches::kRendererProcess || | 249 } else if (process_type == switches::kRendererProcess || |
249 CommandLine::ForCurrentProcess()->HasSwitch( | 250 CommandLine::ForCurrentProcess()->HasSwitch( |
250 switches::kSingleProcess)) { | 251 switches::kSingleProcess)) { |
251 if (delegate) | 252 if (delegate) |
252 content_client->renderer_ = delegate->CreateContentRendererClient(); | 253 content_client->renderer_ = delegate->CreateContentRendererClient(); |
253 if (!content_client->renderer_) | 254 if (!content_client->renderer_) |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 | 682 |
682 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 683 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
683 }; | 684 }; |
684 | 685 |
685 // static | 686 // static |
686 ContentMainRunner* ContentMainRunner::Create() { | 687 ContentMainRunner* ContentMainRunner::Create() { |
687 return new ContentMainRunnerImpl(); | 688 return new ContentMainRunnerImpl(); |
688 } | 689 } |
689 | 690 |
690 } // namespace content | 691 } // namespace content |
OLD | NEW |