Delete unused downloads page asset.
[chromium-blink-merge.git] / ppapi / proxy / udp_socket_private_resource.h
blobf335c6c948264a53f418522f2991b2defe7b83c3
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef PPAPI_PROXY_UDP_SOCKET_PRIVATE_RESOURCE_H_
6 #define PPAPI_PROXY_UDP_SOCKET_PRIVATE_RESOURCE_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ppapi/proxy/ppapi_proxy_export.h"
11 #include "ppapi/proxy/udp_socket_resource_base.h"
12 #include "ppapi/thunk/ppb_udp_socket_private_api.h"
14 namespace ppapi {
15 namespace proxy {
17 class PPAPI_PROXY_EXPORT UDPSocketPrivateResource
18 : public UDPSocketResourceBase,
19 public thunk::PPB_UDPSocket_Private_API {
20 public:
21 UDPSocketPrivateResource(Connection connection, PP_Instance instance);
22 ~UDPSocketPrivateResource() override;
24 // PluginResource implementation.
25 thunk::PPB_UDPSocket_Private_API* AsPPB_UDPSocket_Private_API() override;
27 // PPB_UDPSocket_Private_API implementation.
28 int32_t SetSocketFeature(PP_UDPSocketFeature_Private name,
29 PP_Var value) override;
30 int32_t Bind(const PP_NetAddress_Private* addr,
31 scoped_refptr<TrackedCallback> callback) override;
32 PP_Bool GetBoundAddress(PP_NetAddress_Private* addr) override;
33 int32_t RecvFrom(char* buffer,
34 int32_t num_bytes,
35 scoped_refptr<TrackedCallback> callback) override;
36 PP_Bool GetRecvFromAddress(PP_NetAddress_Private* addr) override;
37 int32_t SendTo(const char* buffer,
38 int32_t num_bytes,
39 const PP_NetAddress_Private* addr,
40 scoped_refptr<TrackedCallback> callback) override;
41 void Close() override;
43 private:
44 DISALLOW_COPY_AND_ASSIGN(UDPSocketPrivateResource);
47 } // namespace proxy
48 } // namespace ppapi
50 #endif // PPAPI_PROXY_UDP_SOCKET_PRIVATE_RESOURCE_H_