Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(397)

Unified Diff: ppapi/proxy/flash_device_id_resource.cc

Issue 11022005: Converted PluginResource reply message handling to use base::Callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/flash_device_id_resource.h ('k') | ppapi/proxy/gamepad_resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/flash_device_id_resource.cc
diff --git a/ppapi/proxy/flash_device_id_resource.cc b/ppapi/proxy/flash_device_id_resource.cc
index 39ff63bb7c35215d2280e0f591b2c2d6b7c34049..1698b499de1a9d89659a62fe7a48ca571d42f6d1 100644
--- a/ppapi/proxy/flash_device_id_resource.cc
+++ b/ppapi/proxy/flash_device_id_resource.cc
@@ -4,6 +4,7 @@
#include "ppapi/proxy/flash_device_id_resource.h"
+#include "base/bind.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/proxy/dispatch_reply_message.h"
#include "ppapi/proxy/ppapi_messages.h"
@@ -38,20 +39,12 @@ int32_t FlashDeviceIDResource::GetDeviceID(
dest_ = id;
callback_ = callback;
- CallBrowser(PpapiHostMsg_FlashDeviceID_GetDeviceID());
+ CallBrowser<PpapiPluginMsg_FlashDeviceID_GetDeviceIDReply>(
+ PpapiHostMsg_FlashDeviceID_GetDeviceID(),
+ base::Bind(&FlashDeviceIDResource::OnPluginMsgGetDeviceIDReply, this));
return PP_OK_COMPLETIONPENDING;
}
-void FlashDeviceIDResource::OnReplyReceived(
- const ResourceMessageReplyParams& params,
- const IPC::Message& msg) {
- IPC_BEGIN_MESSAGE_MAP(FlashDeviceIDResource, msg)
- PPAPI_DISPATCH_RESOURCE_REPLY(
- PpapiPluginMsg_FlashDeviceID_GetDeviceIDReply,
- OnPluginMsgGetDeviceIDReply)
- IPC_END_MESSAGE_MAP()
-}
-
void FlashDeviceIDResource::OnPluginMsgGetDeviceIDReply(
const ResourceMessageReplyParams& params,
const std::string& id) {
« no previous file with comments | « ppapi/proxy/flash_device_id_resource.h ('k') | ppapi/proxy/gamepad_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698