Chromium Code Reviews| Index: content/ppapi_plugin/ppapi_thread.cc |
| diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc |
| index a29a63903b4e7e36cf57bd3f1ad87d7d1edb2d61..1040e252e956ff29f04c534cdaf8cad3d8d21852 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 "ppapi/shared_impl/api_id.h" |
| #include "third_party/WebKit/public/web/WebKit.h" |
| #include "ui/base/ui_base_switches.h" |
| @@ -103,6 +105,12 @@ PpapiThread::PpapiThread(const CommandLine& command_line, bool is_broker) |
| // note that only those InterfaceProxy-based ones require registration. |
| AddRoute(ppapi::API_ID_PPB_HOSTRESOLVER_PRIVATE, |
| &dispatcher_message_listener_); |
| + |
| + if (!is_broker_) { |
| + channel()->AddFilter( |
| + new ppapi::proxy::PluginMessageFilter( |
|
dmichael (off chromium)
2013/12/11 21:30:36
Why do we need this filter *and* the one the dispa
yzshen1
2013/12/11 22:22:07
This is the channel between the browser and the pl
|
| + NULL, globals->resource_reply_thread_registrar())); |
|
dmichael (off chromium)
2013/12/11 21:30:36
Why are you passing a NULL GloballyInstanceIDSet n
yzshen1
2013/12/11 22:22:07
Because between the browser and the plugin we don'
|
| + } |
| } |
| PpapiThread::~PpapiThread() { |
| @@ -135,7 +143,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; |
| @@ -386,13 +393,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 |