Index: chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc |
diff --git a/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc b/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc |
index 265a6b07fe7022cd1e6303069a7e72f787e43655..3032b69a0baa8fa3625972464aa31e3a86dca1d1 100644 |
--- a/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc |
+++ b/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc |
@@ -4,17 +4,20 @@ |
#include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h" |
-#include "chrome/browser/renderer_host/pepper/pepper_broker_host.h" |
+#include "chrome/browser/renderer_host/pepper/pepper_broker_message_filter.h" |
#include "chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h" |
#include "chrome/browser/renderer_host/pepper/pepper_flash_device_id_host.h" |
#include "chrome/browser/renderer_host/pepper/pepper_talk_host.h" |
#include "content/public/browser/browser_ppapi_host.h" |
+#include "ppapi/host/message_filter_host.h" |
#include "ppapi/host/ppapi_host.h" |
#include "ppapi/host/resource_host.h" |
#include "ppapi/proxy/ppapi_messages.h" |
#include "ppapi/shared_impl/ppapi_permissions.h" |
+using ppapi::host::MessageFilterHost; |
using ppapi::host::ResourceHost; |
+using ppapi::host::ResourceMessageFilter; |
namespace chrome { |
@@ -41,9 +44,13 @@ scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost( |
if (host_->GetPpapiHost()->permissions().HasPermission( |
ppapi::PERMISSION_PRIVATE)) { |
switch (message.type()) { |
- case PpapiHostMsg_Broker_Create::ID: |
- return scoped_ptr<ResourceHost>(new PepperBrokerHost( |
- host_, instance, params.pp_resource())); |
+ case PpapiHostMsg_Broker_Create::ID: { |
+ scoped_refptr<ResourceMessageFilter> broker_filter( |
+ new PepperBrokerMessageFilter(instance, host_)); |
+ return scoped_ptr<ResourceHost>(new MessageFilterHost( |
+ host_->GetPpapiHost(), instance, params.pp_resource(), |
+ broker_filter)); |
+ } |
case PpapiHostMsg_FlashDeviceID_Create::ID: |
return scoped_ptr<ResourceHost>(new PepperFlashDeviceIDHost( |
host_, instance, params.pp_resource())); |