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

Unified Diff: chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc

Issue 11617005: Refactor PepperFlashFileHost and PepperBrokerHost to use MessageFilterHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | « no previous file | chrome/browser/renderer_host/pepper/pepper_broker_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()));
« no previous file with comments | « no previous file | chrome/browser/renderer_host/pepper/pepper_broker_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698