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

Unified Diff: ppapi/proxy/plugin_main_nacl.cc

Issue 10984094: Hook up PpapiPermissions in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months 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
Index: ppapi/proxy/plugin_main_nacl.cc
diff --git a/ppapi/proxy/plugin_main_nacl.cc b/ppapi/proxy/plugin_main_nacl.cc
index aae60b063b0eabcb7242cd8c09938a90579f2406..1b5ff55a5019bed95f5e144c4cbc0295935ec191 100644
--- a/ppapi/proxy/plugin_main_nacl.cc
+++ b/ppapi/proxy/plugin_main_nacl.cc
@@ -76,6 +76,7 @@ class PpapiDispatcher : public ProxyChannel,
private:
void OnMsgCreateNaClChannel(int renderer_id,
+ const ppapi::PpapiPermissions& permissions,
bool incognito,
SerializedHandle handle);
void OnPluginDispatcherMessageReceived(const IPC::Message& msg);
@@ -182,11 +183,18 @@ bool PpapiDispatcher::OnMessageReceived(const IPC::Message& msg) {
return true;
}
-void PpapiDispatcher::OnMsgCreateNaClChannel(int renderer_id,
- bool incognito,
- SerializedHandle handle) {
+void PpapiDispatcher::OnMsgCreateNaClChannel(
+ int renderer_id,
+ const ppapi::PpapiPermissions& permissions,
+ bool incognito,
+ SerializedHandle handle) {
+ // Tell the process-global GetInterface which interfaces it can return to the
+ // plugin.
+ ppapi::proxy::InterfaceList::SetProcessGlobalPermissions(
+ permissions);
+
PluginDispatcher* dispatcher =
- new PluginDispatcher(::PPP_GetInterface, incognito);
+ new PluginDispatcher(::PPP_GetInterface, permissions, incognito);
// The channel handle's true name is not revealed here.
IPC::ChannelHandle channel_handle("nacl", handle.descriptor());
if (!dispatcher->InitPluginWithChannel(this, channel_handle, false)) {

Powered by Google App Engine
This is Rietveld 408576698