diff options
Diffstat (limited to 'ppapi/thunk')
-rw-r--r-- | ppapi/thunk/interfaces_ppb_private.h | 2 | ||||
-rw-r--r-- | ppapi/thunk/ppb_udp_socket_private_api.h | 2 | ||||
-rw-r--r-- | ppapi/thunk/ppb_udp_socket_private_thunk.cc | 25 |
3 files changed, 29 insertions, 0 deletions
diff --git a/ppapi/thunk/interfaces_ppb_private.h b/ppapi/thunk/interfaces_ppb_private.h index 144d64c..a3c800d 100644 --- a/ppapi/thunk/interfaces_ppb_private.h +++ b/ppapi/thunk/interfaces_ppb_private.h @@ -58,6 +58,8 @@ PROXIED_IFACE(PPB_UDPSocket_Private, PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2, PPB_UDPSocket_Private_0_2) PROXIED_IFACE(PPB_UDPSocket_Private, PPB_UDPSOCKET_PRIVATE_INTERFACE_0_3, PPB_UDPSocket_Private_0_3) +PROXIED_IFACE(PPB_UDPSocket_Private, PPB_UDPSOCKET_PRIVATE_INTERFACE_0_4, + PPB_UDPSocket_Private_0_4) PROXIED_IFACE(PPB_X509Certificate_Private, PPB_X509CERTIFICATE_PRIVATE_INTERFACE_0_1, PPB_X509Certificate_Private_0_1) diff --git a/ppapi/thunk/ppb_udp_socket_private_api.h b/ppapi/thunk/ppb_udp_socket_private_api.h index 0b2a3c6..9c403a0 100644 --- a/ppapi/thunk/ppb_udp_socket_private_api.h +++ b/ppapi/thunk/ppb_udp_socket_private_api.h @@ -19,6 +19,8 @@ class PPAPI_THUNK_EXPORT PPB_UDPSocket_Private_API { public: virtual ~PPB_UDPSocket_Private_API() {} + virtual int32_t SetSocketFeature(PP_UDPSocketFeature_Private name, + PP_Var value) = 0; virtual int32_t Bind(const PP_NetAddress_Private* addr, scoped_refptr<TrackedCallback> callback) = 0; virtual PP_Bool GetBoundAddress(PP_NetAddress_Private* addr) = 0; diff --git a/ppapi/thunk/ppb_udp_socket_private_thunk.cc b/ppapi/thunk/ppb_udp_socket_private_thunk.cc index bfd6e1c..a493666 100644 --- a/ppapi/thunk/ppb_udp_socket_private_thunk.cc +++ b/ppapi/thunk/ppb_udp_socket_private_thunk.cc @@ -30,6 +30,15 @@ PP_Bool IsUDPSocket(PP_Resource resource) { return PP_FromBool(enter.succeeded()); } +int32_t SetSocketFeature(PP_Resource udp_socket, + PP_UDPSocketFeature_Private name, + PP_Var value) { + EnterUDP enter(udp_socket, true); + if (enter.failed()) + return PP_ERROR_BADRESOURCE; + return enter.object()->SetSocketFeature(name, value); +} + int32_t Bind(PP_Resource udp_socket, const PP_NetAddress_Private *addr, PP_CompletionCallback callback) { @@ -109,6 +118,18 @@ const PPB_UDPSocket_Private_0_3 g_ppb_udp_socket_thunk_0_3 = { &Close }; +const PPB_UDPSocket_Private_0_4 g_ppb_udp_socket_thunk_0_4 = { + &Create, + &IsUDPSocket, + &SetSocketFeature, + &Bind, + &GetBoundAddress, + &RecvFrom, + &GetRecvFromAddress, + &SendTo, + &Close +}; + } // namespace const PPB_UDPSocket_Private_0_2* GetPPB_UDPSocket_Private_0_2_Thunk() { @@ -119,5 +140,9 @@ const PPB_UDPSocket_Private_0_3* GetPPB_UDPSocket_Private_0_3_Thunk() { return &g_ppb_udp_socket_thunk_0_3; } +const PPB_UDPSocket_Private_0_4* GetPPB_UDPSocket_Private_0_4_Thunk() { + return &g_ppb_udp_socket_thunk_0_4; +} + } // namespace thunk } // namespace ppapi |