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

Unified Diff: content/browser/renderer_host/pepper/content_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
Index: content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc
diff --git a/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc b/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc
index f43d8521d35929d322ced4d1c0931c4f97e42bba..75e3ac464e13eae8981e59ebbd69e8180a51b54e 100644
--- a/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc
+++ b/content/browser/renderer_host/pepper/content_browser_pepper_host_factory.cc
@@ -6,15 +6,19 @@
#include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
#include "content/browser/renderer_host/pepper/pepper_browser_font_singleton_host.h"
-#include "content/browser/renderer_host/pepper/pepper_flash_file_host.h"
+#include "content/browser/renderer_host/pepper/pepper_flash_file_message_filter.h"
#include "content/browser/renderer_host/pepper/pepper_gamepad_host.h"
#include "content/browser/renderer_host/pepper/pepper_print_settings_manager.h"
#include "content/browser/renderer_host/pepper/pepper_printing_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 content {
@@ -69,9 +73,13 @@ scoped_ptr<ResourceHost> ContentBrowserPepperHostFactory::CreateResourceHost(
// Flash interfaces.
if (GetPermissions().HasPermission(ppapi::PERMISSION_FLASH)) {
switch (message.type()) {
- case PpapiHostMsg_FlashFile_Create::ID:
- return scoped_ptr<ResourceHost>(new PepperFlashFileHost(
- host_, instance, params.pp_resource()));
+ case PpapiHostMsg_FlashFile_Create::ID: {
+ scoped_refptr<ResourceMessageFilter> file_filter(
+ new PepperFlashFileMessageFilter(instance, host_));
+ return scoped_ptr<ResourceHost>(new MessageFilterHost(
+ host_->GetPpapiHost(), instance, params.pp_resource(),
+ file_filter));
+ }
}
}
« no previous file with comments | « content/browser/plugin_data_remover_impl.cc ('k') | content/browser/renderer_host/pepper/pepper_flash_file_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698