Modified code to report caret offset and text selection in all editable text and...
[chromium-blink-merge.git] / ppapi / thunk / ppb_udp_socket_api.h
blob028c562eb507e3c78580d09569022fcdcc7958db
1 // Copyright 2013 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_THUNK_PPB_UDP_SOCKET_API_H_
6 #define PPAPI_THUNK_PPB_UDP_SOCKET_API_H_
8 #include "base/memory/ref_counted.h"
9 #include "ppapi/c/ppb_udp_socket.h"
10 #include "ppapi/thunk/ppapi_thunk_export.h"
12 namespace ppapi {
14 class TrackedCallback;
16 namespace thunk {
18 class PPAPI_THUNK_EXPORT PPB_UDPSocket_API {
19 public:
20 virtual ~PPB_UDPSocket_API() {}
22 virtual int32_t Bind(PP_Resource addr,
23 scoped_refptr<TrackedCallback> callback) = 0;
24 virtual PP_Resource GetBoundAddress() = 0;
25 virtual int32_t RecvFrom(char* buffer,
26 int32_t num_bytes,
27 PP_Resource* addr,
28 scoped_refptr<TrackedCallback> callback) = 0;
29 virtual int32_t SendTo(const char* buffer,
30 int32_t num_bytes,
31 PP_Resource addr,
32 scoped_refptr<TrackedCallback> callback) = 0;
33 virtual void Close() = 0;
34 virtual int32_t SetOption1_0(PP_UDPSocket_Option name,
35 const PP_Var& value,
36 scoped_refptr<TrackedCallback> callback) = 0;
37 virtual int32_t SetOption1_1(PP_UDPSocket_Option name,
38 const PP_Var& value,
39 scoped_refptr<TrackedCallback> callback) = 0;
40 virtual int32_t SetOption(PP_UDPSocket_Option name,
41 const PP_Var& value,
42 scoped_refptr<TrackedCallback> callback) = 0;
43 virtual int32_t JoinGroup(PP_Resource group,
44 scoped_refptr<TrackedCallback> callback) = 0;
45 virtual int32_t LeaveGroup(PP_Resource group,
46 scoped_refptr<TrackedCallback> callback) = 0;
49 } // namespace thunk
50 } // namespace ppapi
52 #endif // PPAPI_THUNK_PPB_UDP_SOCKET_API_H_