Chromium Code Reviews| Index: content/browser/ppapi_plugin_process_host.cc |
| diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc |
| index 012536f1c9c8aa476820f66ed5c7d197451ad599..b77fe1d773bfa6bbac0dc7384c83f5e94a4c28dc 100644 |
| --- a/content/browser/ppapi_plugin_process_host.cc |
| +++ b/content/browser/ppapi_plugin_process_host.cc |
| @@ -111,16 +111,14 @@ PpapiPluginProcessHost::PpapiPluginProcessHost(net::HostResolver* host_resolver) |
| : filter_(new PepperMessageFilter(PepperMessageFilter::PLUGIN, |
| host_resolver)), |
| network_observer_(new PluginNetworkObserver(this)), |
| - is_broker_(false), |
| - process_id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()) { |
| + is_broker_(false) { |
| process_.reset(new BrowserChildProcessHostImpl( |
| content::PROCESS_TYPE_PPAPI_PLUGIN, this)); |
| process_->GetHost()->AddFilter(filter_.get()); |
| } |
| PpapiPluginProcessHost::PpapiPluginProcessHost() |
| - : is_broker_(true), |
| - process_id_(ChildProcessHostImpl::GenerateChildProcessUniqueId()) { |
| + : is_broker_(true) { |
| process_.reset(new BrowserChildProcessHostImpl( |
| content::PROCESS_TYPE_PPAPI_BROKER, this)); |
| } |
| @@ -207,10 +205,12 @@ void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { |
| PpapiMsg_CreateChannel* msg = new PpapiMsg_CreateChannel(process_handle, |
| renderer_id); |
| msg->set_unblock(true); |
| - if (Send(msg)) |
| + if (Send(msg)) { |
| sent_requests_.push(client); |
| - else |
| - client->OnChannelOpened(base::kNullProcessHandle, IPC::ChannelHandle()); |
| + } else { |
| + client->OnChannelOpened(base::kNullProcessHandle, IPC::ChannelHandle(), |
| + process_->GetData().id); |
|
yzshen1
2012/04/11 18:30:46
Should it be 0?
|
| + } |
| } |
| void PpapiPluginProcessHost::OnProcessLaunched() { |
| @@ -257,13 +257,13 @@ void PpapiPluginProcessHost::CancelRequests() { |
| << "CancelRequests()"; |
| for (size_t i = 0; i < pending_requests_.size(); i++) { |
| pending_requests_[i]->OnChannelOpened(base::kNullProcessHandle, |
| - IPC::ChannelHandle()); |
| + IPC::ChannelHandle(), 0); |
| } |
| pending_requests_.clear(); |
| while (!sent_requests_.empty()) { |
| sent_requests_.front()->OnChannelOpened(base::kNullProcessHandle, |
| - IPC::ChannelHandle()); |
| + IPC::ChannelHandle(), 0); |
| sent_requests_.pop(); |
| } |
| } |
| @@ -295,5 +295,6 @@ void PpapiPluginProcessHost::OnRendererPluginChannelCreated( |
| base::ProcessHandle renderers_plugin_handle = plugin_process; |
| #endif |
| - client->OnChannelOpened(renderers_plugin_handle, channel_handle); |
| + client->OnChannelOpened(renderers_plugin_handle, channel_handle, |
| + process_->GetData().id); |
| } |