| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef PPAPI_PROXY_PPB_UDP_SOCKET_PRIVATE_PROXY_H_ | |
| 6 #define PPAPI_PROXY_PPB_UDP_SOCKET_PRIVATE_PROXY_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "ppapi/c/pp_instance.h" | |
| 12 #include "ppapi/c/pp_resource.h" | |
| 13 #include "ppapi/c/private/ppb_udp_socket_private.h" | |
| 14 #include "ppapi/proxy/interface_proxy.h" | |
| 15 | |
| 16 namespace ppapi { | |
| 17 namespace proxy { | |
| 18 | |
| 19 class PPB_UDPSocket_Private_Proxy : public InterfaceProxy { | |
| 20 public: | |
| 21 PPB_UDPSocket_Private_Proxy(Dispatcher* dispatcher); | |
| 22 virtual ~PPB_UDPSocket_Private_Proxy(); | |
| 23 | |
| 24 static PP_Resource CreateProxyResource(PP_Instance instance); | |
| 25 | |
| 26 // InterfaceProxy implementation. | |
| 27 virtual bool OnMessageReceived(const IPC::Message& msg); | |
| 28 | |
| 29 static const ApiID kApiID = API_ID_PPB_UDPSOCKET_PRIVATE; | |
| 30 | |
| 31 private: | |
| 32 // Browser->plugin message handlers. | |
| 33 void OnMsgBindACK(uint32 plugin_dispatcher_id, | |
| 34 uint32 socket_id, | |
| 35 bool succeeded, | |
| 36 const PP_NetAddress_Private& bound_addr); | |
| 37 void OnMsgRecvFromACK(uint32 plugin_dispatcher_id, | |
| 38 uint32 socket_id, | |
| 39 bool succeeded, | |
| 40 const std::string& data, | |
| 41 const PP_NetAddress_Private& addr); | |
| 42 void OnMsgSendToACK(uint32 plugin_dispatcher_id, | |
| 43 uint32 socket_id, | |
| 44 bool succeeded, | |
| 45 int32_t bytes_written); | |
| 46 | |
| 47 DISALLOW_COPY_AND_ASSIGN(PPB_UDPSocket_Private_Proxy); | |
| 48 }; | |
| 49 | |
| 50 } // namespace proxy | |
| 51 } // namespace ppapi | |
| 52 | |
| 53 #endif // PPAPI_PROXY_PPB_UDP_SOCKET_PRIVATE_PROXY_H_ | |
| OLD | NEW |