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_FLASH_UDP_SOCKET_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_FLASH_UDP_SOCKET_PROXY_H_ |
6 #define PPAPI_PROXY_PPB_FLASH_UDP_SOCKET_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_FLASH_UDP_SOCKET_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 extern const int32_t kFlashUDPSocketMaxReadSize; | 21 extern const int32_t kFlashUDPSocketMaxReadSize; |
22 // The maximum number of bytes that each PpapiHostMsg_PPBFlashUDPSocket_SendTo | 22 // The maximum number of bytes that each PpapiHostMsg_PPBFlashUDPSocket_SendTo |
23 // message is allowed to carry. | 23 // message is allowed to carry. |
24 extern const int32_t kFlashUDPSocketMaxWriteSize; | 24 extern const int32_t kFlashUDPSocketMaxWriteSize; |
25 | 25 |
26 class PPB_Flash_UDPSocket_Proxy : public InterfaceProxy { | 26 class PPB_Flash_UDPSocket_Proxy : public InterfaceProxy { |
27 public: | 27 public: |
28 PPB_Flash_UDPSocket_Proxy(Dispatcher* dispatcher); | 28 PPB_Flash_UDPSocket_Proxy(Dispatcher* dispatcher); |
29 virtual ~PPB_Flash_UDPSocket_Proxy(); | 29 virtual ~PPB_Flash_UDPSocket_Proxy(); |
30 | 30 |
31 static const Info* GetInfo(); | |
32 | |
33 static PP_Resource CreateProxyResource(PP_Instance instance); | 31 static PP_Resource CreateProxyResource(PP_Instance instance); |
34 | 32 |
35 // InterfaceProxy implementation. | 33 // InterfaceProxy implementation. |
36 virtual bool OnMessageReceived(const IPC::Message& msg); | 34 virtual bool OnMessageReceived(const IPC::Message& msg); |
37 | 35 |
38 private: | 36 private: |
39 // Browser->plugin message handlers. | 37 // Browser->plugin message handlers. |
40 void OnMsgBindACK(uint32 plugin_dispatcher_id, | 38 void OnMsgBindACK(uint32 plugin_dispatcher_id, |
41 uint32 socket_id, | 39 uint32 socket_id, |
42 bool succeeded); | 40 bool succeeded); |
43 void OnMsgRecvFromACK(uint32 plugin_dispatcher_id, | 41 void OnMsgRecvFromACK(uint32 plugin_dispatcher_id, |
44 uint32 socket_id, | 42 uint32 socket_id, |
45 bool succeeded, | 43 bool succeeded, |
46 const std::string& data, | 44 const std::string& data, |
47 const PP_Flash_NetAddress& addr); | 45 const PP_Flash_NetAddress& addr); |
48 void OnMsgSendToACK(uint32 plugin_dispatcher_id, | 46 void OnMsgSendToACK(uint32 plugin_dispatcher_id, |
49 uint32 socket_id, | 47 uint32 socket_id, |
50 bool succeeded, | 48 bool succeeded, |
51 int32_t bytes_written); | 49 int32_t bytes_written); |
52 | 50 |
53 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_UDPSocket_Proxy); | 51 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_UDPSocket_Proxy); |
54 }; | 52 }; |
55 | 53 |
56 } // namespace proxy | 54 } // namespace proxy |
57 } // namespace ppapi | 55 } // namespace ppapi |
58 | 56 |
59 #endif // PPAPI_PROXY_PPB_FLASH_UDP_SOCKET_PROXY_H_ | 57 #endif // PPAPI_PROXY_PPB_FLASH_UDP_SOCKET_PROXY_H_ |
60 | 58 |
OLD | NEW |