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

Side by Side Diff: content/browser/ppapi_broker_process_host.cc

Issue 7978009: Split ppapi::PluginList from PepperPluginRegistry so that DRT could load pepper plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/ppapi_broker_process_host.h" 5 #include "content/browser/ppapi_broker_process_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "content/browser/plugin_service.h" 11 #include "content/browser/plugin_service.h"
12 #include "content/browser/renderer_host/render_message_filter.h" 12 #include "content/browser/renderer_host/render_message_filter.h"
13 #include "content/common/content_switches.h" 13 #include "content/common/content_switches.h"
14 #include "content/common/pepper_plugin_registry.h"
15 #include "ipc/ipc_switches.h" 14 #include "ipc/ipc_switches.h"
16 #include "ppapi/proxy/ppapi_messages.h" 15 #include "ppapi/proxy/ppapi_messages.h"
16 #include "webkit/plugins/ppapi/ppapi_plugin_info.h"
17 17
18 PpapiBrokerProcessHost::PpapiBrokerProcessHost() 18 PpapiBrokerProcessHost::PpapiBrokerProcessHost()
19 : BrowserChildProcessHost(ChildProcessInfo::PPAPI_BROKER_PROCESS) { 19 : BrowserChildProcessHost(ChildProcessInfo::PPAPI_BROKER_PROCESS) {
20 } 20 }
21 21
22 PpapiBrokerProcessHost::~PpapiBrokerProcessHost() { 22 PpapiBrokerProcessHost::~PpapiBrokerProcessHost() {
23 CancelRequests(); 23 CancelRequests();
24 } 24 }
25 25
26 bool PpapiBrokerProcessHost::Init(const PepperPluginInfo& info) { 26 bool PpapiBrokerProcessHost::Init(const webkit::ppapi::PluginInfo& info) {
27 broker_path_ = info.path; 27 broker_path_ = info.path;
28 set_name(UTF8ToUTF16(info.name)); 28 set_name(UTF8ToUTF16(info.name));
29 set_version(UTF8ToUTF16(info.version)); 29 set_version(UTF8ToUTF16(info.version));
30 30
31 if (!CreateChannel()) 31 if (!CreateChannel())
32 return false; 32 return false;
33 33
34 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); 34 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
35 // Use the same launcher mechanism as ppapi plugins. 35 // Use the same launcher mechanism as ppapi plugins.
36 CommandLine::StringType plugin_launcher = 36 CommandLine::StringType plugin_launcher =
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 ::DuplicateHandle(::GetCurrentProcess(), broker_process, 175 ::DuplicateHandle(::GetCurrentProcess(), broker_process,
176 renderer_process, &renderers_broker_handle, 176 renderer_process, &renderers_broker_handle,
177 0, FALSE, DUPLICATE_SAME_ACCESS); 177 0, FALSE, DUPLICATE_SAME_ACCESS);
178 #elif defined(OS_POSIX) 178 #elif defined(OS_POSIX)
179 // Don't need to duplicate anything on POSIX since it's just a PID. 179 // Don't need to duplicate anything on POSIX since it's just a PID.
180 base::ProcessHandle renderers_broker_handle = broker_process; 180 base::ProcessHandle renderers_broker_handle = broker_process;
181 #endif 181 #endif
182 182
183 client->OnChannelOpened(renderers_broker_handle, channel_handle); 183 client->OnChannelOpened(renderers_broker_handle, channel_handle);
184 } 184 }
OLDNEW
« no previous file with comments | « content/browser/ppapi_broker_process_host.h ('k') | content/browser/ppapi_plugin_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698