diff options
-rw-r--r-- | ppapi/proxy/ppb_broker_proxy.cc | 4 | ||||
-rw-r--r-- | ppapi/proxy/ppb_flash_message_loop_proxy.cc | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ppapi/proxy/ppb_broker_proxy.cc b/ppapi/proxy/ppb_broker_proxy.cc index f7818dc..4e19b66 100644 --- a/ppapi/proxy/ppb_broker_proxy.cc +++ b/ppapi/proxy/ppb_broker_proxy.cc @@ -147,6 +147,8 @@ bool PPB_Broker_Proxy::OnMessageReceived(const IPC::Message& msg) { void PPB_Broker_Proxy::OnMsgCreate(PP_Instance instance, HostResource* result_resource) { + if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) + return; thunk::EnterResourceCreation enter(instance); if (enter.succeeded()) { result_resource->SetHostResource( @@ -156,6 +158,8 @@ void PPB_Broker_Proxy::OnMsgCreate(PP_Instance instance, } void PPB_Broker_Proxy::OnMsgConnect(const HostResource& broker) { + if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) + return; EnterHostFromHostResourceForceCallback<PPB_Broker_API> enter( broker, callback_factory_, &PPB_Broker_Proxy::ConnectCompleteInHost, broker); diff --git a/ppapi/proxy/ppb_flash_message_loop_proxy.cc b/ppapi/proxy/ppb_flash_message_loop_proxy.cc index c4d4ce1..8b7ff823 100644 --- a/ppapi/proxy/ppb_flash_message_loop_proxy.cc +++ b/ppapi/proxy/ppb_flash_message_loop_proxy.cc @@ -118,6 +118,8 @@ bool PPB_Flash_MessageLoop_Proxy::OnMessageReceived(const IPC::Message& msg) { void PPB_Flash_MessageLoop_Proxy::OnMsgCreate(PP_Instance instance, HostResource* result) { + if (!dispatcher()->permissions().HasPermission(PERMISSION_FLASH)) + return; thunk::EnterResourceCreation enter(instance); if (enter.succeeded()) { result->SetHostResource( @@ -128,6 +130,9 @@ void PPB_Flash_MessageLoop_Proxy::OnMsgCreate(PP_Instance instance, void PPB_Flash_MessageLoop_Proxy::OnMsgRun( const HostResource& flash_message_loop, IPC::Message* reply) { + if (!dispatcher()->permissions().HasPermission(PERMISSION_FLASH)) + return; + PPB_Flash_MessageLoop_API::RunFromHostProxyCallback callback = base::Bind(&PPB_Flash_MessageLoop_Proxy::WillQuitSoon, AsWeakPtr(), base::Passed(scoped_ptr<IPC::Message>(reply))); |