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

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

Issue 9235035: Add getter methods for sockaddr. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Fixing errors found by review system. Created 8 years, 11 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
Index: ppapi/native_client/src/shared/ppapi_proxy/ppb_rpc_client.cc
===================================================================
--- ppapi/native_client/src/shared/ppapi_proxy/ppb_rpc_client.cc (revision 119128)
+++ ppapi/native_client/src/shared/ppapi_proxy/ppb_rpc_client.cc (working copy)
@@ -2026,6 +2026,57 @@
return retval;
}
+NaClSrpcError PpbNetAddressPrivateRpcClient::PPB_NetAddress_Private_GetFamily(
+ NaClSrpcChannel* channel,
+ nacl_abi_size_t addr_bytes, char* addr,
+ int32_t* addr_family) {
+ VCHECK(ppapi_proxy::PPBCoreInterface()->IsMainThread(),
+ ("%s: PPAPI calls are not supported off the main thread\n",
+ __FUNCTION__));
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPB_NetAddress_Private_GetFamily:C:i",
+ addr_bytes, addr,
+ addr_family
+ );
+ return retval;
+}
+
+NaClSrpcError PpbNetAddressPrivateRpcClient::PPB_NetAddress_Private_GetPort(
+ NaClSrpcChannel* channel,
+ nacl_abi_size_t addr_bytes, char* addr,
+ int32_t* port) {
+ VCHECK(ppapi_proxy::PPBCoreInterface()->IsMainThread(),
+ ("%s: PPAPI calls are not supported off the main thread\n",
+ __FUNCTION__));
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPB_NetAddress_Private_GetPort:C:i",
+ addr_bytes, addr,
+ port
+ );
+ return retval;
+}
+
+NaClSrpcError PpbNetAddressPrivateRpcClient::PPB_NetAddress_Private_GetAddress(
+ NaClSrpcChannel* channel,
+ nacl_abi_size_t addr_bytes, char* addr,
+ nacl_abi_size_t* address_bytes, char* address) {
+ VCHECK(ppapi_proxy::PPBCoreInterface()->IsMainThread(),
+ ("%s: PPAPI calls are not supported off the main thread\n",
+ __FUNCTION__));
+ NaClSrpcError retval;
+ retval = NaClSrpcInvokeBySignature(
+ channel,
+ "PPB_NetAddress_Private_GetAddress:C:C",
+ addr_bytes, addr,
+ address_bytes, address
+ );
+ return retval;
+}
+
NaClSrpcError PpbPdfRpcClient::PPB_PDF_GetLocalizedString(
NaClSrpcChannel* channel,
PP_Instance instance,

Powered by Google App Engine
This is Rietveld 408576698