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

Unified Diff: ppapi/proxy/ppb_instance_proxy.cc

Issue 564573002: PPAPI: Make PPP_MessageHandler work in PNaCl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 6 years, 3 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/ppb_instance_proxy.h ('k') | ppapi/tests/test_message_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_instance_proxy.cc
diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
index e93a21900ef5eacda01d61841b48f970d035fb7e..1dfb897ca681e99acd45a7aea198da903fda2d19 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -838,7 +838,7 @@ void PPB_Instance_Proxy::PostMessage(PP_Instance instance,
int32_t PPB_Instance_Proxy::RegisterMessageHandler(
PP_Instance instance,
void* user_data,
- const PPP_MessageHandler_0_1* handler,
+ const PPP_MessageHandler_0_2* handler,
PP_Resource message_loop) {
InstanceData* data =
static_cast<PluginDispatcher*>(dispatcher())->GetInstanceData(instance);
@@ -853,6 +853,25 @@ int32_t PPB_Instance_Proxy::RegisterMessageHandler(
return result;
}
+// TODO(dmichael): Remove this. crbug.com/414398
+int32_t PPB_Instance_Proxy::RegisterMessageHandler_1_1_Deprecated(
+ PP_Instance instance,
+ void* user_data,
+ const PPP_MessageHandler_0_1_Deprecated* handler,
+ PP_Resource message_loop) {
+ InstanceData* data =
+ static_cast<PluginDispatcher*>(dispatcher())->GetInstanceData(instance);
+ if (!data)
+ return PP_ERROR_BADARGUMENT;
+
+ int32_t result = PP_ERROR_FAILED;
+ scoped_ptr<MessageHandler> message_handler = MessageHandler::CreateDeprecated(
+ instance, handler, user_data, message_loop, &result);
+ if (message_handler)
+ data->message_handler = message_handler.Pass();
+ return result;
+}
+
void PPB_Instance_Proxy::UnregisterMessageHandler(PP_Instance instance) {
InstanceData* data =
static_cast<PluginDispatcher*>(dispatcher())->GetInstanceData(instance);
« no previous file with comments | « ppapi/proxy/ppb_instance_proxy.h ('k') | ppapi/tests/test_message_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698