OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_plugin_process_host.h" | 5 #include "content/browser/ppapi_plugin_process_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 profile_data_directory_(profile_data_directory), | 211 profile_data_directory_(profile_data_directory), |
212 is_broker_(false) { | 212 is_broker_(false) { |
213 process_.reset(new BrowserChildProcessHostImpl( | 213 process_.reset(new BrowserChildProcessHostImpl( |
214 PROCESS_TYPE_PPAPI_PLUGIN, this)); | 214 PROCESS_TYPE_PPAPI_PLUGIN, this)); |
215 | 215 |
216 host_impl_.reset(new BrowserPpapiHostImpl(this, permissions_, info.name, | 216 host_impl_.reset(new BrowserPpapiHostImpl(this, permissions_, info.name, |
217 info.path, profile_data_directory, | 217 info.path, profile_data_directory, |
218 false)); | 218 false)); |
219 | 219 |
220 filter_ = new PepperMessageFilter(); | 220 filter_ = new PepperMessageFilter(); |
221 process_->GetHost()->AddFilter(filter_.get()); | 221 process_->AddFilter(filter_.get()); |
222 process_->GetHost()->AddFilter(host_impl_->message_filter().get()); | 222 process_->GetHost()->AddFilter(host_impl_->message_filter().get()); |
223 | 223 |
224 GetContentClient()->browser()->DidCreatePpapiPlugin(host_impl_.get()); | 224 GetContentClient()->browser()->DidCreatePpapiPlugin(host_impl_.get()); |
225 | 225 |
226 // Only request network status updates if the plugin has dev permissions. | 226 // Only request network status updates if the plugin has dev permissions. |
227 if (permissions_.HasPermission(ppapi::PERMISSION_DEV)) | 227 if (permissions_.HasPermission(ppapi::PERMISSION_DEV)) |
228 network_observer_.reset(new PluginNetworkObserver(this)); | 228 network_observer_.reset(new PluginNetworkObserver(this)); |
229 } | 229 } |
230 | 230 |
231 PpapiPluginProcessHost::PpapiPluginProcessHost() | 231 PpapiPluginProcessHost::PpapiPluginProcessHost() |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 // sent_requests_ queue should be the one that the plugin just created. | 424 // sent_requests_ queue should be the one that the plugin just created. |
425 Client* client = sent_requests_.front(); | 425 Client* client = sent_requests_.front(); |
426 sent_requests_.pop(); | 426 sent_requests_.pop(); |
427 | 427 |
428 const ChildProcessData& data = process_->GetData(); | 428 const ChildProcessData& data = process_->GetData(); |
429 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 429 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
430 data.id); | 430 data.id); |
431 } | 431 } |
432 | 432 |
433 } // namespace content | 433 } // namespace content |
OLD | NEW |