| Index: content/browser/plugin_process_host.cc
|
| ===================================================================
|
| --- content/browser/plugin_process_host.cc (revision 112597)
|
| +++ content/browser/plugin_process_host.cc (working copy)
|
| @@ -22,6 +22,7 @@
|
| #include "base/string_util.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "content/browser/plugin_service.h"
|
| +#include "content/common/child_process_host.h"
|
| #include "content/common/plugin_messages.h"
|
| #include "content/common/resource_messages.h"
|
| #include "content/public/browser/browser_thread.h"
|
| @@ -85,6 +86,10 @@
|
| plugin_parent_windows_set_.insert(window);
|
| }
|
|
|
| +void PluginProcessHost::AddFilter(IPC::ChannelProxy::MessageFilter* filter) {
|
| + child_process_host()->AddFilter(filter);
|
| +}
|
| +
|
| void PluginProcessHost::OnReparentPluginWindow(HWND window, HWND parent) {
|
| // Reparent only from the plugin process to our process.
|
| DWORD process_id = 0;
|
| @@ -167,7 +172,7 @@
|
| info_ = info;
|
| set_name(info_.name);
|
|
|
| - if (!CreateChannel())
|
| + if (!child_process_host()->CreateChannel())
|
| return false;
|
|
|
| // Build command line for plugin. When we have a plugin launcher, we can't
|
| @@ -182,12 +187,13 @@
|
| // archaic "feature." See http://crbug.com/93551.
|
| int flags = CHILD_ALLOW_HEAP_EXECUTION;
|
| #elif defined(OS_LINUX)
|
| - int flags = plugin_launcher.empty() ? CHILD_ALLOW_SELF : CHILD_NORMAL;
|
| + int flags = plugin_launcher.empty() ? ChildProcessHost::CHILD_ALLOW_SELF :
|
| + ChildProcessHost::CHILD_NORMAL;
|
| #else
|
| - int flags = CHILD_NORMAL;
|
| + int flags = ChildProcessHost::CHILD_NORMAL;
|
| #endif
|
|
|
| - FilePath exe_path = GetChildPath(flags);
|
| + FilePath exe_path = ChildProcessHost::GetChildPath(flags);
|
| if (exe_path.empty())
|
| return false;
|
|
|
| @@ -233,7 +239,8 @@
|
| cmd_line->AppendSwitchASCII(switches::kLang, locale);
|
| }
|
|
|
| - cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id());
|
| + cmd_line->AppendSwitchASCII(switches::kProcessChannelID,
|
| + child_process_host()->channel_id());
|
|
|
| #if defined(OS_POSIX)
|
| base::environment_vector env;
|
| @@ -359,7 +366,7 @@
|
| void PluginProcessHost::OpenChannelToPlugin(Client* client) {
|
| Notify(content::NOTIFICATION_CHILD_INSTANCE_CREATED);
|
| client->SetPluginInfo(info_);
|
| - if (opening_channel()) {
|
| + if (child_process_host()->opening_channel()) {
|
| // The channel is already in the process of being opened. Put
|
| // this "open channel" request into a queue of requests that will
|
| // be run once the channel is open.
|
|
|