| Index: ppapi/proxy/plugin_dispatcher.cc
|
| diff --git a/ppapi/proxy/plugin_dispatcher.cc b/ppapi/proxy/plugin_dispatcher.cc
|
| index 9cf606e2571198c45e07522dd2dc57fa7becbe01..931471354e3e14239a534b3dde3bbd01c7876aa4 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,12 @@ 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()));
|
| +
|
| 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 +275,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) {
|
|
|