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

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: fix build error after rebase Created 8 years, 10 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/thunk/ppb_udp_socket_private_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9ee8b9dc0f5cd16ef0228d0ed8849114dce01916..4f12a3fc5336e66bb250cbd8d25a964c64fb5b9c 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 enter.SetResult(enter.object()->Bind(addr, callback));
}
+PP_Bool GetBoundAddress(PP_Resource udp_socket,
+ PP_NetAddress_Private* addr) {
+ EnterUDP 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,
@@ -74,10 +82,21 @@ void Close(PP_Resource udp_socket) {
enter.object()->Close();
}
-const PPB_UDPSocket_Private g_ppb_udp_socket_thunk = {
+const PPB_UDPSocket_Private_0_2 g_ppb_udp_socket_thunk_0_2 = {
+ &Create,
+ &IsUDPSocket,
+ &Bind,
+ &RecvFrom,
+ &GetRecvFromAddress,
+ &SendTo,
+ &Close
+};
+
+const PPB_UDPSocket_Private_0_3 g_ppb_udp_socket_thunk_0_3 = {
&Create,
&IsUDPSocket,
&Bind,
+ &GetBoundAddress,
&RecvFrom,
&GetRecvFromAddress,
&SendTo,
@@ -87,7 +106,11 @@ const PPB_UDPSocket_Private g_ppb_udp_socket_thunk = {
} // namespace
const PPB_UDPSocket_Private_0_2* GetPPB_UDPSocket_Private_0_2_Thunk() {
- return &g_ppb_udp_socket_thunk;
+ return &g_ppb_udp_socket_thunk_0_2;
+}
+
+const PPB_UDPSocket_Private_0_3* GetPPB_UDPSocket_Private_0_3_Thunk() {
+ return &g_ppb_udp_socket_thunk_0_3;
}
} // namespace thunk
« no previous file with comments | « ppapi/thunk/ppb_udp_socket_private_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698