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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
225 // We already have an open channel, send a request right away to plugin. | 225 // We already have an open channel, send a request right away to plugin. |
226 RequestPluginChannel(client); | 226 RequestPluginChannel(client); |
227 } | 227 } |
228 | 228 |
229 PpapiPluginProcessHost::PpapiPluginProcessHost( | 229 PpapiPluginProcessHost::PpapiPluginProcessHost( |
230 const PepperPluginInfo& info, | 230 const PepperPluginInfo& info, |
231 const base::FilePath& profile_data_directory) | 231 const base::FilePath& profile_data_directory) |
232 : profile_data_directory_(profile_data_directory), | 232 : profile_data_directory_(profile_data_directory), |
233 is_broker_(false) { | 233 is_broker_(false) { |
234 uint32 base_permissions = info.permissions; | 234 uint32 base_permissions = info.permissions; |
235 if (GetContentClient()->browser()->IsPluginAllowedToUseDevChannelAPIs()) | 235 |
236 // We don't have to do any whitelisting for APIs this process host, so don't | |
dmichael (off chromium)
2014/06/13 21:07:26
APIs +in+ this process host?
teravest
2014/06/13 21:13:00
Done.
| |
237 // bother passing a browser context or document url here. | |
238 if (GetContentClient()->browser()->IsPluginAllowedToUseDevChannelAPIs( | |
239 NULL, GURL())) | |
236 base_permissions |= ppapi::PERMISSION_DEV_CHANNEL; | 240 base_permissions |= ppapi::PERMISSION_DEV_CHANNEL; |
237 permissions_ = ppapi::PpapiPermissions::GetForCommandLine(base_permissions); | 241 permissions_ = ppapi::PpapiPermissions::GetForCommandLine(base_permissions); |
238 | 242 |
239 process_.reset(new BrowserChildProcessHostImpl( | 243 process_.reset(new BrowserChildProcessHostImpl( |
240 PROCESS_TYPE_PPAPI_PLUGIN, this)); | 244 PROCESS_TYPE_PPAPI_PLUGIN, this)); |
241 | 245 |
242 host_impl_.reset(new BrowserPpapiHostImpl(this, permissions_, info.name, | 246 host_impl_.reset(new BrowserPpapiHostImpl(this, permissions_, info.name, |
243 info.path, profile_data_directory, | 247 info.path, profile_data_directory, |
244 false /* in_process */, | 248 false /* in_process */, |
245 false /* external_plugin */)); | 249 false /* external_plugin */)); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
458 // sent_requests_ queue should be the one that the plugin just created. | 462 // sent_requests_ queue should be the one that the plugin just created. |
459 Client* client = sent_requests_.front(); | 463 Client* client = sent_requests_.front(); |
460 sent_requests_.pop(); | 464 sent_requests_.pop(); |
461 | 465 |
462 const ChildProcessData& data = process_->GetData(); | 466 const ChildProcessData& data = process_->GetData(); |
463 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), | 467 client->OnPpapiChannelOpened(channel_handle, base::GetProcId(data.handle), |
464 data.id); | 468 data.id); |
465 } | 469 } |
466 | 470 |
467 } // namespace content | 471 } // namespace content |
OLD | NEW |