Index: ppapi/proxy/plugin_dispatcher.cc |
diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc |
index 9cf606e2571198c45e07522dd2dc57fa7becbe01..81349e629ce5de2be4bd5ee708339378c1a5c97e 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" |
@@ -189,10 +191,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; |
+ } |
+ */ |
bbudge
2012/07/02 20:06:06
?
|
+ |
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); |
@@ -271,6 +282,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) { |