Chromium Code Reviews| Index: ppapi/proxy/udp_socket_resource.cc |
| diff --git a/ppapi/proxy/udp_socket_resource.cc b/ppapi/proxy/udp_socket_resource.cc |
| index d815b9fa62f5b77d2765ea85a07f2b793f386ba6..545bd29092d6f31fa5129b4d34f053633f35afca 100644 |
| --- a/ppapi/proxy/udp_socket_resource.cc |
| +++ b/ppapi/proxy/udp_socket_resource.cc |
| @@ -84,6 +84,18 @@ int32_t UDPSocketResource::SetOption1_0( |
| callback); |
| } |
| +int32_t UDPSocketResource::SetOption1_1( |
| + PP_UDPSocket_Option name, |
| + const PP_Var& value, |
| + scoped_refptr<TrackedCallback> callback) { |
| + if (name > PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE) |
| + return PP_ERROR_BADARGUMENT; |
| + |
| + return SetOptionImpl(name, value, |
| + true, // Check bind() state. |
|
bbudge
2015/02/13 00:03:16
This should be false (1.1 relaxed bind restriction
etrunko
2015/02/13 20:19:58
Done.
|
| + callback); |
| +} |
| + |
| int32_t UDPSocketResource::SetOption( |
| PP_UDPSocket_Option name, |
| const PP_Var& value, |
| @@ -93,5 +105,27 @@ int32_t UDPSocketResource::SetOption( |
| callback); |
| } |
| +int32_t UDPSocketResource::JoinGroup( |
| + PP_Resource group, |
| + scoped_refptr<TrackedCallback> callback) { |
| + EnterNetAddressNoLock enter(group, true); |
| + if (enter.failed()) |
| + return PP_ERROR_BADRESOURCE; |
| + |
| + return JoinGroupImpl(&enter.object()->GetNetAddressPrivate(), |
| + callback); |
| +} |
| + |
| +int32_t UDPSocketResource::LeaveGroup( |
| + PP_Resource group, |
| + scoped_refptr<TrackedCallback> callback) { |
| + EnterNetAddressNoLock enter(group, true); |
| + if (enter.failed()) |
| + return PP_ERROR_BADRESOURCE; |
| + |
| + return LeaveGroupImpl(&enter.object()->GetNetAddressPrivate(), |
| + callback); |
| +} |
| + |
| } // namespace proxy |
| } // namespace ppapi |