| Index: content/browser/ppapi_plugin_process_host.cc
|
| ===================================================================
|
| --- content/browser/ppapi_plugin_process_host.cc (revision 112775)
|
| +++ content/browser/ppapi_plugin_process_host.cc (working copy)
|
| @@ -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 @@
|
| }
|
|
|
| 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 @@
|
| 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 @@
|
| 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 @@
|
| 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[] = {
|
|
|