Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(666)

Unified Diff: content/browser/ppapi_plugin_process_host.cc

Issue 112343005: Pepper: Finish support for dev channel APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for dmichael Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/nacl/browser/nacl_process_host.cc ('k') | content/ppapi_plugin/ppapi_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 51eaadb5e7b910c0a186bc4088b35072fd5101b4..131b07476828ff95b9af10dd2564d1ff5644b929 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++)
« no previous file with comments | « components/nacl/browser/nacl_process_host.cc ('k') | content/ppapi_plugin/ppapi_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698