Index: content/ppapi_plugin/ppapi_thread.cc |
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc |
index f0db1561447c5cb8025c39dbfd2c4f69923ae304..5ed1873cce87364ef7a0aeb231b58a3bebd2cf44 100644 |
--- a/content/ppapi_plugin/ppapi_thread.cc |
+++ b/content/ppapi_plugin/ppapi_thread.cc |
@@ -36,7 +36,9 @@ |
#include "ppapi/c/ppp.h" |
#include "ppapi/proxy/interface_list.h" |
#include "ppapi/proxy/plugin_globals.h" |
+#include "ppapi/proxy/plugin_message_filter.h" |
#include "ppapi/proxy/ppapi_messages.h" |
+#include "ppapi/proxy/resource_reply_thread_registrar.h" |
#include "third_party/WebKit/public/web/WebKit.h" |
#include "ui/base/ui_base_switches.h" |
@@ -72,6 +74,12 @@ PpapiThread::PpapiThread(const CommandLine& command_line, bool is_broker) |
webkit_platform_support_.reset(new PpapiWebKitPlatformSupportImpl); |
blink::initialize(webkit_platform_support_.get()); |
+ |
+ if (!is_broker_) { |
+ channel()->AddFilter( |
+ new ppapi::proxy::PluginMessageFilter( |
+ NULL, globals->resource_reply_thread_registrar())); |
+ } |
} |
PpapiThread::~PpapiThread() { |
@@ -104,7 +112,6 @@ bool PpapiThread::OnControlMessageReceived(const IPC::Message& msg) { |
IPC_MESSAGE_HANDLER(PpapiMsg_SetNetworkState, OnSetNetworkState) |
IPC_MESSAGE_HANDLER(PpapiMsg_Crash, OnCrash) |
IPC_MESSAGE_HANDLER(PpapiMsg_Hang, OnHang) |
- IPC_MESSAGE_HANDLER(PpapiPluginMsg_ResourceReply, OnResourceReply) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
return handled; |
@@ -355,13 +362,6 @@ void PpapiThread::OnCreateChannel(base::ProcessId renderer_pid, |
Send(new PpapiHostMsg_ChannelCreated(channel_handle)); |
} |
-void PpapiThread::OnResourceReply( |
- const ppapi::proxy::ResourceMessageReplyParams& reply_params, |
- const IPC::Message& nested_msg) { |
- ppapi::proxy::PluginDispatcher::DispatchResourceReply(reply_params, |
- nested_msg); |
-} |
- |
void PpapiThread::OnSetNetworkState(bool online) { |
// Note the browser-process side shouldn't send us these messages in the |
// first unless the plugin has dev permissions, so we don't need to check |