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 |