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

Unified Diff: ppapi/thunk/ppb_udp_socket_private_thunk.cc

Issue 9212047: Add GetBoundAddress to PPB_UDPSocket_Private (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add GetBoundAddress to retrieve address we bound to. 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/thunk/ppb_udp_socket_private_thunk.cc
diff --git a/ppapi/thunk/ppb_udp_socket_private_thunk.cc b/ppapi/thunk/ppb_udp_socket_private_thunk.cc
index 60e95fe9f7e974f8a15752d97079504645f09103..36a8fa6a4c3618851d109e226cf5c9304c161276 100644
--- a/ppapi/thunk/ppb_udp_socket_private_thunk.cc
+++ b/ppapi/thunk/ppb_udp_socket_private_thunk.cc
@@ -38,6 +38,14 @@ int32_t Bind(PP_Resource udp_socket,
return MayForceCallback(callback, result);
}
+PP_Bool GetBoundAddress(PP_Resource udp_socket,
+ PP_NetAddress_Private* addr) {
+ EnterResource<PPB_UDPSocket_Private_API> enter(udp_socket, true);
+ if (enter.failed())
+ return PP_FALSE;
+ return enter.object()->GetBoundAddress(addr);
+}
+
int32_t RecvFrom(PP_Resource udp_socket,
char* buffer,
int32_t num_bytes,
@@ -81,6 +89,7 @@ const PPB_UDPSocket_Private g_ppb_udp_socket_thunk = {
&Create,
&IsUDPSocket,
&Bind,
+ &GetBoundAddress,
&RecvFrom,
&GetRecvFromAddress,
&SendTo,

Powered by Google App Engine
This is Rietveld 408576698