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

Unified Diff: ppapi/thunk/ppb_udp_socket_private_thunk.cc

Issue 10735056: AllowBroadcast() is exposed to NaCl. (Closed) Base URL: http://git.chromium.org/chromium/src.git@udp_broadcast
Patch Set: Sync. Created 8 years, 4 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') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('j') | 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 bfd6e1cdb0db074e9d62993d72f7ec80bb0f87b1..a4936667d3c38bdccdf83dc520edb18d3600995c 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
« no previous file with comments | « ppapi/thunk/ppb_udp_socket_private_api.h ('k') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698