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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/ppb_rpc_client.cc

Issue 8920005: Add TestingInstance::EvalScript method which posts a message that the test page can eval(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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
Index: ppapi/native_client/src/shared/ppapi_proxy/ppb_rpc_client.cc
===================================================================
--- ppapi/native_client/src/shared/ppapi_proxy/ppb_rpc_client.cc (revision 114053)
+++ ppapi/native_client/src/shared/ppapi_proxy/ppb_rpc_client.cc (working copy)
@@ -2557,6 +2557,44 @@
return retval;
}
+NaClSrpcError PpbTestingRpcClient::PPB_Testing_SimulateInputEvent(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ PP_Resource input_event) {
+ VCHECK(ppapi_proxy::PPBCoreInterface()->IsMainThread(),
+ ("%s: PPAPI calls are not supported off the main thread\n",
+ __FUNCTION__));
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPB_Testing_SimulateInputEvent:ii:",
+ instance,
+ input_event
+ );
+ return retval;
+}
+
+NaClSrpcError PpbTestingRpcClient::PPB_Testing_ExecuteScript(
+ NaClSrpcChannel* channel,
+ PP_Instance instance,
+ nacl_abi_size_t script_bytes, char* script,
+ nacl_abi_size_t* result_bytes, char* result,
+ nacl_abi_size_t* exception_bytes, char* exception) {
+ VCHECK(ppapi_proxy::PPBCoreInterface()->IsMainThread(),
+ ("%s: PPAPI calls are not supported off the main thread\n",
+ __FUNCTION__));
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPB_Testing_ExecuteScript:iC:CC",
+ instance,
+ script_bytes, script,
+ result_bytes, result,
+ exception_bytes, exception
+ );
+ return retval;
+}
+
NaClSrpcError PpbUDPSocketPrivateRpcClient::PPB_UDPSocket_Private_Create(
NaClSrpcChannel* channel,
PP_Instance instance_id,

Powered by Google App Engine
This is Rietveld 408576698