OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PPAPI_PROXY_PPB_UDP_SOCKET_PRIVATE_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_UDP_SOCKET_PRIVATE_PROXY_H_ |
6 #define PPAPI_PROXY_PPB_UDP_SOCKET_PRIVATE_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_UDP_SOCKET_PRIVATE_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "ppapi/c/pp_instance.h" | 11 #include "ppapi/c/pp_instance.h" |
12 #include "ppapi/c/pp_resource.h" | 12 #include "ppapi/c/pp_resource.h" |
13 #include "ppapi/c/private/ppb_udp_socket_private.h" | 13 #include "ppapi/c/private/ppb_udp_socket_private.h" |
14 #include "ppapi/proxy/interface_proxy.h" | 14 #include "ppapi/proxy/interface_proxy.h" |
15 | 15 |
16 namespace ppapi { | 16 namespace ppapi { |
17 namespace proxy { | 17 namespace proxy { |
18 | 18 |
| 19 // The maximum number of bytes that each PpapiHostMsg_PPBUDPSocket_RecvFrom |
| 20 // message is allowed to request. |
| 21 extern const int32_t kUDPSocketMaxReadSize; |
| 22 // The maximum number of bytes that each PpapiHostMsg_PPBUDPSocket_SendTo |
| 23 // message is allowed to carry. |
| 24 extern const int32_t kUDPSocketMaxWriteSize; |
| 25 |
19 class PPB_UDPSocket_Private_Proxy : public InterfaceProxy { | 26 class PPB_UDPSocket_Private_Proxy : public InterfaceProxy { |
20 public: | 27 public: |
21 PPB_UDPSocket_Private_Proxy(Dispatcher* dispatcher); | 28 PPB_UDPSocket_Private_Proxy(Dispatcher* dispatcher); |
22 virtual ~PPB_UDPSocket_Private_Proxy(); | 29 virtual ~PPB_UDPSocket_Private_Proxy(); |
23 | 30 |
24 static PP_Resource CreateProxyResource(PP_Instance instance); | 31 static PP_Resource CreateProxyResource(PP_Instance instance); |
25 | 32 |
26 // InterfaceProxy implementation. | 33 // InterfaceProxy implementation. |
27 virtual bool OnMessageReceived(const IPC::Message& msg); | 34 virtual bool OnMessageReceived(const IPC::Message& msg); |
28 | 35 |
(...skipping 14 matching lines...) Expand all Loading... |
43 bool succeeded, | 50 bool succeeded, |
44 int32_t bytes_written); | 51 int32_t bytes_written); |
45 | 52 |
46 DISALLOW_COPY_AND_ASSIGN(PPB_UDPSocket_Private_Proxy); | 53 DISALLOW_COPY_AND_ASSIGN(PPB_UDPSocket_Private_Proxy); |
47 }; | 54 }; |
48 | 55 |
49 } // namespace proxy | 56 } // namespace proxy |
50 } // namespace ppapi | 57 } // namespace ppapi |
51 | 58 |
52 #endif // PPAPI_PROXY_PPB_UDP_SOCKET_PRIVATE_PROXY_H_ | 59 #endif // PPAPI_PROXY_PPB_UDP_SOCKET_PRIVATE_PROXY_H_ |
| 60 |
OLD | NEW |