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

Unified Diff: ppapi/proxy/plugin_resource.cc

Issue 11028104: Add template SyncCall() to PluginResource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync & resolve 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/plugin_resource.h ('k') | ppapi/proxy/ppapi_message_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/plugin_resource.cc
diff --git a/ppapi/proxy/plugin_resource.cc b/ppapi/proxy/plugin_resource.cc
index 1cfc3f10c6e695d3b7f0384fce7b654827b43d93..99ade839fc91a05d7018643230ca57aeafc04f0d 100644
--- a/ppapi/proxy/plugin_resource.cc
+++ b/ppapi/proxy/plugin_resource.cc
@@ -4,7 +4,6 @@
#include "ppapi/proxy/plugin_resource.h"
-#include "ppapi/c/pp_errors.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/proxy/resource_message_params.h"
@@ -81,29 +80,15 @@ bool PluginResource::SendResourceCall(
return sender->Send(new PpapiHostMsg_ResourceCall(call_params, nested_msg));
}
-int32_t PluginResource::CallBrowserSync(const IPC::Message& msg,
+int32_t PluginResource::GenericSyncCall(Destination dest,
+ const IPC::Message& msg,
IPC::Message* reply) {
ResourceMessageCallParams params(pp_resource(),
next_sequence_number_++);
params.set_has_callback();
ResourceMessageReplyParams reply_params;
- bool success =
- connection_.browser_sender->Send(new PpapiHostMsg_ResourceSyncCall(
- params, msg, &reply_params, reply));
- if (success)
- return reply_params.result();
- return PP_ERROR_FAILED;
-}
-
-int32_t PluginResource::CallRendererSync(const IPC::Message& msg,
- IPC::Message* reply) {
- ResourceMessageCallParams params(pp_resource(),
- next_sequence_number_++);
- params.set_has_callback();
- ResourceMessageReplyParams reply_params;
- bool success =
- connection_.renderer_sender->Send(new PpapiHostMsg_ResourceSyncCall(
- params, msg, &reply_params, reply));
+ bool success = GetSender(dest)->Send(new PpapiHostMsg_ResourceSyncCall(
+ params, msg, &reply_params, reply));
if (success)
return reply_params.result();
return PP_ERROR_FAILED;
« no previous file with comments | « ppapi/proxy/plugin_resource.h ('k') | ppapi/proxy/ppapi_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698