Chromium Code Reviews| Index: ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_testing_rpc_server.cc |
| diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_testing_rpc_server.cc b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_testing_rpc_server.cc |
| index ceb8aaedb61b5a6945811747a639c2973d9a228c..673752b853f3f55656abb78e1e7a4b6bad42f5c3 100644 |
| --- a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_testing_rpc_server.cc |
| +++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppb_testing_rpc_server.cc |
| @@ -90,4 +90,24 @@ void PpbTestingRpcServer::PPB_Testing_GetLiveObjectsForInstance( |
| rpc->result = NACL_SRPC_RESULT_OK; |
| } |
| +void PpbTestingRpcServer::PPB_Testing_GetDocumentURL( |
| + NaClSrpcRpc* rpc, |
| + NaClSrpcClosure* done, |
| + PP_Instance instance, |
| + nacl_abi_size_t* components_bytes, char* components, |
| + nacl_abi_size_t* url_bytes, char* url) { |
| + NaClSrpcClosureRunner runner(done); |
| + rpc->result = NACL_SRPC_RESULT_APP_ERROR; |
| + |
| + if (*components_bytes != sizeof(struct PP_URLComponents_Dev)) |
| + return; |
| + if (*url_bytes != ppapi_proxy::kMaxVarSize) |
| + return; |
| + |
| + struct PP_Var pp_url = PPBTestingInterface()->GetDocumentURL( |
| + instance, reinterpret_cast<struct PP_URLComponents_Dev*>(components)); |
|
yzshen1
2011/12/13 18:49:54
Is there any potential alignment problem with rein
ygorshenin
2011/12/14 17:41:10
Look at PpbTestingRpcServer::PPB_Testing_ReadImage
|
| + if (!ppapi_proxy::SerializeTo(&pp_url, url, url_bytes)) |
| + return; |
| + rpc->result = NACL_SRPC_RESULT_OK; |
|
yzshen1
2011/12/13 18:49:54
I would suggest to follow other methods and add De
ygorshenin
2011/12/14 17:41:10
Done.
|
| +} |