| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_UDP_SOCKET_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_UDP_SOCKET_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_UDP_SOCKET_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_UDP_SOCKET_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 ~PepperUDPSocket(); | 35 ~PepperUDPSocket(); |
| 36 | 36 |
| 37 int routing_id() { return routing_id_; } | 37 int routing_id() { return routing_id_; } |
| 38 | 38 |
| 39 void AllowAddressReuse(bool value); | 39 void AllowAddressReuse(bool value); |
| 40 void AllowBroadcast(bool value); | 40 void AllowBroadcast(bool value); |
| 41 void Bind(const PP_NetAddress_Private& addr); | 41 void Bind(const PP_NetAddress_Private& addr); |
| 42 void RecvFrom(int32_t num_bytes); | 42 void RecvFrom(int32_t num_bytes); |
| 43 void SendTo(const std::string& data, const PP_NetAddress_Private& addr); | 43 void SendTo(const std::string& data, const PP_NetAddress_Private& addr); |
| 44 void SendBindACKError(); | 44 void SendBindACKError(); |
| 45 void SendSendToACKError(); |
| 45 | 46 |
| 46 private: | 47 private: |
| 47 void SendRecvFromACKError(); | 48 void SendRecvFromACKError(); |
| 48 void SendSendToACKError(); | |
| 49 | 49 |
| 50 void OnBindCompleted(int result); | 50 void OnBindCompleted(int result); |
| 51 void OnRecvFromCompleted(int result); | 51 void OnRecvFromCompleted(int result); |
| 52 void OnSendToCompleted(int result); | 52 void OnSendToCompleted(int result); |
| 53 | 53 |
| 54 PepperMessageFilter* manager_; | 54 PepperMessageFilter* manager_; |
| 55 int32 routing_id_; | 55 int32 routing_id_; |
| 56 uint32 plugin_dispatcher_id_; | 56 uint32 plugin_dispatcher_id_; |
| 57 uint32 socket_id_; | 57 uint32 socket_id_; |
| 58 bool allow_address_reuse_; | 58 bool allow_address_reuse_; |
| 59 bool allow_broadcast_; | 59 bool allow_broadcast_; |
| 60 | 60 |
| 61 scoped_ptr<net::UDPServerSocket> socket_; | 61 scoped_ptr<net::UDPServerSocket> socket_; |
| 62 | 62 |
| 63 scoped_refptr<net::IOBuffer> recvfrom_buffer_; | 63 scoped_refptr<net::IOBuffer> recvfrom_buffer_; |
| 64 scoped_refptr<net::IOBuffer> sendto_buffer_; | 64 scoped_refptr<net::IOBuffer> sendto_buffer_; |
| 65 | 65 |
| 66 net::IPEndPoint recvfrom_address_; | 66 net::IPEndPoint recvfrom_address_; |
| 67 net::IPEndPoint bound_address_; | 67 net::IPEndPoint bound_address_; |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(PepperUDPSocket); | 69 DISALLOW_COPY_AND_ASSIGN(PepperUDPSocket); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace content | 72 } // namespace content |
| 73 | 73 |
| 74 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_UDP_SOCKET_H_ | 74 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_UDP_SOCKET_H_ |
| OLD | NEW |