| Index: ppapi/proxy/udp_socket_private_resource.h
|
| diff --git a/ppapi/proxy/udp_socket_private_resource.h b/ppapi/proxy/udp_socket_private_resource.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..67d7fb63ddb67ca86a332219022ff4346f26ea75
|
| --- /dev/null
|
| +++ b/ppapi/proxy/udp_socket_private_resource.h
|
| @@ -0,0 +1,56 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// 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_PRIVATE_RESOURCE_H_
|
| +#define PPAPI_PROXY_UDP_SOCKET_PRIVATE_RESOURCE_H_
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/compiler_specific.h"
|
| +#include "ppapi/proxy/plugin_resource.h"
|
| +#include "ppapi/proxy/ppapi_proxy_export.h"
|
| +#include "ppapi/shared_impl/private/ppb_udp_socket_shared.h"
|
| +
|
| +namespace ppapi {
|
| +namespace proxy {
|
| +
|
| +class PPAPI_PROXY_EXPORT UDPSocketPrivateResource
|
| + : public PluginResource,
|
| + public PPB_UDPSocket_Shared {
|
| + public:
|
| + UDPSocketPrivateResource(Connection connection,
|
| + PP_Instance instance);
|
| + virtual ~UDPSocketPrivateResource();
|
| +
|
| + // PluginResource implementation.
|
| + virtual thunk::PPB_UDPSocket_Private_API*
|
| + AsPPB_UDPSocket_Private_API() OVERRIDE;
|
| +
|
| + // PPB_UDPSocket_Shared implementation.
|
| + virtual void SendBoolSocketFeature(int32_t name, bool value) OVERRIDE;
|
| + virtual void SendBind(const PP_NetAddress_Private& addr) OVERRIDE;
|
| + virtual void SendRecvFrom(int32_t num_bytes) OVERRIDE;
|
| + virtual void SendSendTo(const std::string& buffer,
|
| + const PP_NetAddress_Private& addr) OVERRIDE;
|
| + virtual void SendClose() OVERRIDE;
|
| +
|
| + private:
|
| + // IPC message handlers.
|
| + void OnPluginMsgBindReply(const ResourceMessageReplyParams& params,
|
| + bool succeeded,
|
| + const PP_NetAddress_Private& bound_addr);
|
| + void OnPluginMsgRecvFromReply(const ResourceMessageReplyParams& params,
|
| + bool succeeded,
|
| + const std::string& data,
|
| + const PP_NetAddress_Private& addr);
|
| + void OnPluginMsgSendToReply(const ResourceMessageReplyParams& params,
|
| + bool succeeded,
|
| + int32_t bytes_written);
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(UDPSocketPrivateResource);
|
| +};
|
| +
|
| +} // namespace proxy
|
| +} // namespace ppapi
|
| +
|
| +#endif // PPAPI_PROXY_UDP_SOCKET_PRIVATE_RESOURCE_H_
|
|
|