Index: ppapi/proxy/gamepad_resource.cc |
diff --git a/ppapi/proxy/gamepad_resource.cc b/ppapi/proxy/gamepad_resource.cc |
index 446c11c9f79a372d0e7ed8d878c7e2fa32224ab5..fa028e4e02c9246b967e77dfa8e7ab31635f0ad4 100644 |
--- a/ppapi/proxy/gamepad_resource.cc |
+++ b/ppapi/proxy/gamepad_resource.cc |
@@ -6,6 +6,7 @@ |
#include <string.h> |
+#include "base/bind.h" |
#include "base/threading/platform_thread.h" |
#include "ppapi/proxy/dispatch_reply_message.h" |
#include "ppapi/proxy/ppapi_messages.h" |
@@ -48,7 +49,9 @@ GamepadResource::GamepadResource(Connection connection, PP_Instance instance) |
memset(&last_read_, 0, sizeof(last_read_)); |
SendCreateToBrowser(PpapiHostMsg_Gamepad_Create()); |
- CallBrowser(PpapiHostMsg_Gamepad_RequestMemory()); |
+ CallBrowser<PpapiPluginMsg_Gamepad_SendMemory>( |
+ PpapiHostMsg_Gamepad_RequestMemory(), |
+ base::Bind(&GamepadResource::OnPluginMsgSendMemory, this)); |
} |
GamepadResource::~GamepadResource() { |
@@ -91,14 +94,6 @@ void GamepadResource::Sample(PP_GamepadsSampleData* data) { |
memcpy(data, &last_read_, sizeof(PP_GamepadsSampleData)); |
} |
-void GamepadResource::OnReplyReceived(const ResourceMessageReplyParams& params, |
- const IPC::Message& msg) { |
- IPC_BEGIN_MESSAGE_MAP(GamepadResource, msg) |
- PPAPI_DISPATCH_RESOURCE_REPLY_0(PpapiPluginMsg_Gamepad_SendMemory, |
- OnPluginMsgSendMemory) |
- IPC_END_MESSAGE_MAP() |
-} |
- |
void GamepadResource::OnPluginMsgSendMemory( |
const ResourceMessageReplyParams& params) { |
// On failure, the handle will be null and the CHECK below will be tripped. |