Index: ppapi/proxy/plugin_dispatcher.cc |
diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc |
index ad8c620ef25933c9cd59af739e81b21e612cc911..52f19ffe1847b487c6466aef14fbf4d6a437888e 100644 |
--- a/ppapi/proxy/plugin_dispatcher.cc |
+++ b/ppapi/proxy/plugin_dispatcher.cc |
@@ -23,6 +23,8 @@ |
#include "ppapi/proxy/ppb_instance_proxy.h" |
#include "ppapi/proxy/ppp_class_proxy.h" |
#include "ppapi/proxy/resource_creation_proxy.h" |
+#include "ppapi/proxy/resource_message_params.h" |
+#include "ppapi/shared_impl/ppapi_globals.h" |
#include "ppapi/shared_impl/proxy_lock.h" |
#include "ppapi/shared_impl/resource.h" |
@@ -193,10 +195,19 @@ bool PluginDispatcher::OnMessageReceived(const IPC::Message& msg) { |
TRACE_EVENT2("ppapi proxy", "PluginDispatcher::OnMessageReceived", |
"Class", IPC_MESSAGE_ID_CLASS(msg.type()), |
"Line", IPC_MESSAGE_ID_LINE(msg.type())); |
+ |
+ /* |
+ for (size_t i = 0; i < filters_.size(); i++) { |
+ if (filters_[i]->OnMessageReceived(msg)) |
+ return true; |
+ } |
+ */ |
+ |
if (msg.routing_id() == MSG_ROUTING_CONTROL) { |
// Handle some plugin-specific control messages. |
bool handled = true; |
IPC_BEGIN_MESSAGE_MAP(PluginDispatcher, msg) |
+ IPC_MESSAGE_HANDLER(PpapiPluginMsg_ResourceReply, OnMsgResourceReply) |
IPC_MESSAGE_HANDLER(PpapiMsg_SupportsInterface, OnMsgSupportsInterface) |
IPC_MESSAGE_HANDLER(PpapiMsg_SetPreferences, OnMsgSetPreferences) |
IPC_MESSAGE_UNHANDLED(handled = false); |
@@ -275,6 +286,19 @@ void PluginDispatcher::ForceFreeAllInstances() { |
} |
} |
+void PluginDispatcher::OnMsgResourceReply( |
+ const ppapi::proxy::ResourceMessageReplyParams& reply_params, |
+ const IPC::Message& nested_msg) { |
+ Resource* resource = PpapiGlobals::Get()->GetResourceTracker()->GetResource( |
+ reply_params.pp_resource()); |
+ if (!resource) { |
+ NOTREACHED(); |
+ return; |
+ } |
+ resource->OnReplyReceived(reply_params.sequence(), reply_params.result(), |
+ nested_msg); |
+} |
+ |
void PluginDispatcher::OnMsgSupportsInterface( |
const std::string& interface_name, |
bool* result) { |