| Index: ppapi/proxy/udp_socket_resource_base.h
|
| diff --git a/ppapi/proxy/udp_socket_resource_base.h b/ppapi/proxy/udp_socket_resource_base.h
|
| index b3a66693ed57e4f4d02dd32e24ae1fbfb98890da..6d0ec70bc9551671f155b5417f68f93af145b1e1 100644
|
| --- a/ppapi/proxy/udp_socket_resource_base.h
|
| +++ b/ppapi/proxy/udp_socket_resource_base.h
|
| @@ -2,16 +2,16 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef PPAPI_PROXY_UDP_SOCKET_SHARED_H_
|
| -#define PPAPI_PROXY_UDP_SOCKET_SHARED_H_
|
| +#ifndef PPAPI_PROXY_UDP_SOCKET_RESOURCE_BASE_H_
|
| +#define PPAPI_PROXY_UDP_SOCKET_RESOURCE_BASE_H_
|
|
|
| #include <string>
|
|
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "ppapi/c/dev/ppb_udp_socket_dev.h"
|
| #include "ppapi/c/private/ppb_net_address_private.h"
|
| -#include "ppapi/c/private/ppb_udp_socket_private.h"
|
| #include "ppapi/proxy/plugin_resource.h"
|
| #include "ppapi/proxy/ppapi_proxy_export.h"
|
| #include "ppapi/shared_impl/tracked_callback.h"
|
| @@ -30,12 +30,26 @@ class PPAPI_PROXY_EXPORT UDPSocketResourceBase: public PluginResource {
|
| // message is allowed to carry.
|
| static const int32_t kMaxWriteSize;
|
|
|
| + // The maximum number that we allow for setting
|
| + // PP_UDPSOCKET_OPTION_SEND_BUFFER_SIZE. This number is only for input
|
| + // argument sanity check, it doesn't mean the browser guarantees to support
|
| + // such a buffer size.
|
| + static const int32_t kMaxSendBufferSize;
|
| + // The maximum number that we allow for setting
|
| + // PP_UDPSOCKET_OPTION_RECV_BUFFER_SIZE. This number is only for input
|
| + // argument sanity check, it doesn't mean the browser guarantees to support
|
| + // such a buffer size.
|
| + static const int32_t kMaxReceiveBufferSize;
|
| +
|
| protected:
|
| - UDPSocketResourceBase(Connection connection, PP_Instance instance);
|
| + UDPSocketResourceBase(Connection connection,
|
| + PP_Instance instance,
|
| + bool private_api);
|
| virtual ~UDPSocketResourceBase();
|
|
|
| - int32_t SetSocketFeatureImpl(PP_UDPSocketFeature_Private name,
|
| - const PP_Var& value);
|
| + int32_t SetOptionImpl(PP_UDPSocket_Option_Dev name,
|
| + const PP_Var& value,
|
| + scoped_refptr<TrackedCallback> callback);
|
| int32_t BindImpl(const PP_NetAddress_Private* addr,
|
| scoped_refptr<TrackedCallback> callback);
|
| PP_Bool GetBoundAddressImpl(PP_NetAddress_Private* addr);
|
| @@ -55,6 +69,8 @@ class PPAPI_PROXY_EXPORT UDPSocketResourceBase: public PluginResource {
|
| void PostAbortIfNecessary(scoped_refptr<TrackedCallback>* callback);
|
|
|
| // IPC message handlers.
|
| + void OnPluginMsgSetOptionReply(scoped_refptr<TrackedCallback> callback,
|
| + const ResourceMessageReplyParams& params);
|
| void OnPluginMsgBindReply(const ResourceMessageReplyParams& params,
|
| const PP_NetAddress_Private& bound_addr);
|
| void OnPluginMsgRecvFromReply(PP_Resource* output_addr,
|
| @@ -64,6 +80,7 @@ class PPAPI_PROXY_EXPORT UDPSocketResourceBase: public PluginResource {
|
| void OnPluginMsgSendToReply(const ResourceMessageReplyParams& params,
|
| int32_t bytes_written);
|
|
|
| + bool private_api_;
|
| bool bound_;
|
| bool closed_;
|
|
|
| @@ -83,4 +100,4 @@ class PPAPI_PROXY_EXPORT UDPSocketResourceBase: public PluginResource {
|
| } // namespace proxy
|
| } // namespace ppapi
|
|
|
| -#endif // PPAPI_PROXY_UDP_SOCKET_SHARED_H_
|
| +#endif // PPAPI_PROXY_UDP_SOCKET_RESOURCE_BASE_H_
|
|
|