summaryrefslogtreecommitdiffstats
path: root/content/browser/ppapi_plugin_process_host.cc
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-19 17:10:50 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-19 17:10:50 +0000
commit84350ef4536f877c2e1e5f3b6766a1c9361d76d4 (patch)
treef30ce70c8b8a979aafe94e94cfe2c7eb447d9fe7 /content/browser/ppapi_plugin_process_host.cc
parent3037a702987ad70ba53e3cf4707c397658ed3f23 (diff)
downloadchromium_src-84350ef4536f877c2e1e5f3b6766a1c9361d76d4.zip
chromium_src-84350ef4536f877c2e1e5f3b6766a1c9361d76d4.tar.gz
chromium_src-84350ef4536f877c2e1e5f3b6766a1c9361d76d4.tar.bz2
Pepper: Finish support for dev channel APIs.
This change completes the wiring, adding a file to list dev channel interfaces, analogous to what exists for different permissions today. We only need to introduce interfaces_ppb_public_dev_channel.h since we don't anticipate dev channel APIs with permissions other than NONE. BUG=325403 R=dmichael@chromium.org Review URL: https://codereview.chromium.org/112343005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@241877 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/ppapi_plugin_process_host.cc')
-rw-r--r--content/browser/ppapi_plugin_process_host.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index 51eaadb..131b074 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -207,10 +207,13 @@ void PpapiPluginProcessHost::OpenChannelToPlugin(Client* client) {
PpapiPluginProcessHost::PpapiPluginProcessHost(
const PepperPluginInfo& info,
const base::FilePath& profile_data_directory)
- : permissions_(
- ppapi::PpapiPermissions::GetForCommandLine(info.permissions)),
- profile_data_directory_(profile_data_directory),
+ : profile_data_directory_(profile_data_directory),
is_broker_(false) {
+ uint32 base_permissions = info.permissions;
+ if (GetContentClient()->browser()->IsPluginAllowedToUseDevChannelAPIs())
+ base_permissions |= ppapi::PERMISSION_DEV_CHANNEL;
+ permissions_ = ppapi::PpapiPermissions::GetForCommandLine(base_permissions);
+
process_.reset(new BrowserChildProcessHostImpl(
PROCESS_TYPE_PPAPI_PLUGIN, this));
@@ -384,13 +387,10 @@ bool PpapiPluginProcessHost::OnMessageReceived(const IPC::Message& msg) {
// Called when the browser <--> plugin channel has been established.
void PpapiPluginProcessHost::OnChannelConnected(int32 peer_pid) {
- bool supports_dev_channel =
- GetContentClient()->browser()->IsPluginAllowedToUseDevChannelAPIs();
// This will actually load the plugin. Errors will actually not be reported
// back at this point. Instead, the plugin will fail to establish the
// connections when we request them on behalf of the renderer(s).
- Send(new PpapiMsg_LoadPlugin(plugin_path_, permissions_,
- supports_dev_channel));
+ Send(new PpapiMsg_LoadPlugin(plugin_path_, permissions_));
// Process all pending channel requests from the renderers.
for (size_t i = 0; i < pending_requests_.size(); i++)