summaryrefslogtreecommitdiffstats
path: root/ppapi/thunk
diff options
context:
space:
mode:
authorygorshenin@chromium.org <ygorshenin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-31 08:55:28 +0000
committerygorshenin@chromium.org <ygorshenin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-31 08:55:28 +0000
commit0addda9b12e46523d2f9967709d69dd1b5fb71e1 (patch)
treec533faf1fd41b8bbd343efe7a65634bfe181ecb4 /ppapi/thunk
parentae3e7bc278b7a13b9e5c36cdd5cda6a780f46096 (diff)
downloadchromium_src-0addda9b12e46523d2f9967709d69dd1b5fb71e1.zip
chromium_src-0addda9b12e46523d2f9967709d69dd1b5fb71e1.tar.gz
chromium_src-0addda9b12e46523d2f9967709d69dd1b5fb71e1.tar.bz2
AllowBroadcast() is exposed to NaCl.
BUG=136797 TEST=browser_tests:*.UDPSocketPrivate Review URL: https://chromiumcodereview.appspot.com/10735056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154407 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r--ppapi/thunk/interfaces_ppb_private.h2
-rw-r--r--ppapi/thunk/ppb_udp_socket_private_api.h2
-rw-r--r--ppapi/thunk/ppb_udp_socket_private_thunk.cc25
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