| 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 22 matching lines...) Expand all Loading... |
| 33 ~PepperUDPSocket(); | 33 ~PepperUDPSocket(); |
| 34 | 34 |
| 35 int routing_id() { return routing_id_; } | 35 int routing_id() { return routing_id_; } |
| 36 | 36 |
| 37 void AllowAddressReuse(bool value); | 37 void AllowAddressReuse(bool value); |
| 38 void AllowBroadcast(bool value); | 38 void AllowBroadcast(bool value); |
| 39 void Bind(const PP_NetAddress_Private& addr); | 39 void Bind(const PP_NetAddress_Private& addr); |
| 40 void RecvFrom(int32_t num_bytes); | 40 void RecvFrom(int32_t num_bytes); |
| 41 void SendTo(const std::string& data, const PP_NetAddress_Private& addr); | 41 void SendTo(const std::string& data, const PP_NetAddress_Private& addr); |
| 42 void SendBindACKError(); | 42 void SendBindACKError(); |
| 43 void SendSendToACKError(); |
| 43 | 44 |
| 44 private: | 45 private: |
| 45 void SendRecvFromACKError(); | 46 void SendRecvFromACKError(); |
| 46 void SendSendToACKError(); | |
| 47 | 47 |
| 48 void OnBindCompleted(int result); | 48 void OnBindCompleted(int result); |
| 49 void OnRecvFromCompleted(int result); | 49 void OnRecvFromCompleted(int result); |
| 50 void OnSendToCompleted(int result); | 50 void OnSendToCompleted(int result); |
| 51 | 51 |
| 52 PepperMessageFilter* manager_; | 52 PepperMessageFilter* manager_; |
| 53 int32 routing_id_; | 53 int32 routing_id_; |
| 54 uint32 plugin_dispatcher_id_; | 54 uint32 plugin_dispatcher_id_; |
| 55 uint32 socket_id_; | 55 uint32 socket_id_; |
| 56 bool allow_address_reuse_; | 56 bool allow_address_reuse_; |
| 57 bool allow_broadcast_; | 57 bool allow_broadcast_; |
| 58 | 58 |
| 59 scoped_ptr<net::UDPServerSocket> socket_; | 59 scoped_ptr<net::UDPServerSocket> socket_; |
| 60 | 60 |
| 61 scoped_refptr<net::IOBuffer> recvfrom_buffer_; | 61 scoped_refptr<net::IOBuffer> recvfrom_buffer_; |
| 62 scoped_refptr<net::IOBuffer> sendto_buffer_; | 62 scoped_refptr<net::IOBuffer> sendto_buffer_; |
| 63 | 63 |
| 64 net::IPEndPoint recvfrom_address_; | 64 net::IPEndPoint recvfrom_address_; |
| 65 net::IPEndPoint bound_address_; | 65 net::IPEndPoint bound_address_; |
| 66 | 66 |
| 67 DISALLOW_COPY_AND_ASSIGN(PepperUDPSocket); | 67 DISALLOW_COPY_AND_ASSIGN(PepperUDPSocket); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_UDP_SOCKET_H_ | 70 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_UDP_SOCKET_H_ |
| OLD | NEW |