diff options
Diffstat (limited to 'content/browser/ppapi_plugin_process_host.cc')
-rw-r--r-- | content/browser/ppapi_plugin_process_host.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc index f4ccd33..f633842 100644 --- a/content/browser/ppapi_plugin_process_host.cc +++ b/content/browser/ppapi_plugin_process_host.cc @@ -11,7 +11,7 @@ #include "base/utf_string_conversions.h" #include "content/browser/plugin_service.h" #include "content/browser/renderer_host/render_message_filter.h" -#include "content/common/child_process_host.h" +#include "content/common/child_process_host_impl.h" #include "content/common/child_process_messages.h" #include "content/public/common/content_switches.h" #include "content/public/common/pepper_plugin_info.h" @@ -20,6 +20,9 @@ #include "net/base/network_change_notifier.h" #include "ppapi/proxy/ppapi_messages.h" +using content::ChildProcessHost; +using content::ChildProcessHostImpl; + class PpapiPluginProcessHost::PluginNetworkObserver : public net::NetworkChangeNotifier::IPAddressObserver, public net::NetworkChangeNotifier::OnlineStateObserver { @@ -85,7 +88,7 @@ PpapiPluginProcessHost* PpapiPluginProcessHost::CreateBrokerHost( } void PpapiPluginProcessHost::OpenChannelToPlugin(Client* client) { - if (child_process_host()->opening_channel()) { + if (child_process_host()->IsChannelOpening()) { // 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. @@ -102,14 +105,14 @@ PpapiPluginProcessHost::PpapiPluginProcessHost(net::HostResolver* host_resolver) filter_(new PepperMessageFilter(host_resolver)), network_observer_(new PluginNetworkObserver(this)), is_broker_(false), - process_id_(ChildProcessHost::GenerateChildProcessUniqueId()) { + process_id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()) { child_process_host()->AddFilter(filter_.get()); } PpapiPluginProcessHost::PpapiPluginProcessHost() : BrowserChildProcessHost(content::PROCESS_TYPE_PPAPI_BROKER), is_broker_(true), - process_id_(ChildProcessHost::GenerateChildProcessUniqueId()) { + process_id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()) { } bool PpapiPluginProcessHost::Init(const content::PepperPluginInfo& info) { @@ -120,7 +123,8 @@ bool PpapiPluginProcessHost::Init(const content::PepperPluginInfo& info) { set_name(UTF8ToUTF16(info.name)); } - if (!child_process_host()->CreateChannel()) + std::string channel_id = child_process_host()->CreateChannel(); + if (channel_id.empty()) return false; const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); @@ -141,8 +145,7 @@ bool PpapiPluginProcessHost::Init(const content::PepperPluginInfo& info) { cmd_line->AppendSwitchASCII(switches::kProcessType, is_broker_ ? switches::kPpapiBrokerProcess : switches::kPpapiPluginProcess); - cmd_line->AppendSwitchASCII(switches::kProcessChannelID, - child_process_host()->channel_id()); + cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); // These switches are forwarded to both plugin and broker pocesses. static const char* kCommonForwardSwitches[] = { |