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)) { |