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_TCP_SOCKET_PRIVATE_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_TCP_SOCKET_PRIVATE_PROXY_H_ |
6 #define PPAPI_PROXY_PPB_TCP_SOCKET_PRIVATE_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_TCP_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_tcp_socket_private.h" | 13 #include "ppapi/c/private/ppb_tcp_socket_private.h" |
14 #include "ppapi/proxy/interface_proxy.h" | 14 #include "ppapi/proxy/interface_proxy.h" |
15 #include "ppapi/proxy/ppapi_proxy_export.h" | 15 #include "ppapi/proxy/ppapi_proxy_export.h" |
16 | 16 |
17 namespace ppapi { | 17 namespace ppapi { |
18 namespace proxy { | 18 namespace proxy { |
19 | 19 |
20 // The maximum number of bytes that each PpapiHostMsg_PPBTCPSocket_Read | |
21 // message is allowed to request. | |
22 PPAPI_PROXY_EXPORT extern const int32_t kTCPSocketMaxReadSize; | |
23 // The maximum number of bytes that each PpapiHostMsg_PPBTCPSocket_Write | |
24 // message is allowed to carry. | |
25 PPAPI_PROXY_EXPORT extern const int32_t kTCPSocketMaxWriteSize; | |
26 | |
27 class PPB_TCPSocket_Private_Proxy : public InterfaceProxy { | 20 class PPB_TCPSocket_Private_Proxy : public InterfaceProxy { |
28 public: | 21 public: |
29 PPB_TCPSocket_Private_Proxy(Dispatcher* dispatcher); | 22 PPB_TCPSocket_Private_Proxy(Dispatcher* dispatcher); |
30 virtual ~PPB_TCPSocket_Private_Proxy(); | 23 virtual ~PPB_TCPSocket_Private_Proxy(); |
31 | 24 |
32 static PP_Resource CreateProxyResource(PP_Instance instance); | 25 static PP_Resource CreateProxyResource(PP_Instance instance); |
33 | 26 |
34 // InterfaceProxy implementation. | 27 // InterfaceProxy implementation. |
35 virtual bool OnMessageReceived(const IPC::Message& msg); | 28 virtual bool OnMessageReceived(const IPC::Message& msg); |
36 | 29 |
(...skipping 18 matching lines...) Expand all Loading... |
55 bool succeeded, | 48 bool succeeded, |
56 int32_t bytes_written); | 49 int32_t bytes_written); |
57 | 50 |
58 DISALLOW_COPY_AND_ASSIGN(PPB_TCPSocket_Private_Proxy); | 51 DISALLOW_COPY_AND_ASSIGN(PPB_TCPSocket_Private_Proxy); |
59 }; | 52 }; |
60 | 53 |
61 } // namespace proxy | 54 } // namespace proxy |
62 } // namespace ppapi | 55 } // namespace ppapi |
63 | 56 |
64 #endif // PPAPI_PROXY_PPB_TCP_SOCKET_PRIVATE_PROXY_H_ | 57 #endif // PPAPI_PROXY_PPB_TCP_SOCKET_PRIVATE_PROXY_H_ |
OLD | NEW |