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_UDP_SOCKET_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_PEPPER_UDP_SOCKET_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_UDP_SOCKET_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_PEPPER_UDP_SOCKET_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 int32 routing_id, | 31 int32 routing_id, |
32 uint32 plugin_dispatcher_id, | 32 uint32 plugin_dispatcher_id, |
33 uint32 socket_id); | 33 uint32 socket_id); |
34 ~PepperUDPSocket(); | 34 ~PepperUDPSocket(); |
35 | 35 |
36 int routing_id() { return routing_id_; } | 36 int routing_id() { return routing_id_; } |
37 | 37 |
38 void Bind(const PP_NetAddress_Private& addr); | 38 void Bind(const PP_NetAddress_Private& addr); |
39 void RecvFrom(int32_t num_bytes); | 39 void RecvFrom(int32_t num_bytes); |
40 void SendTo(const std::string& data, const PP_NetAddress_Private& addr); | 40 void SendTo(const std::string& data, const PP_NetAddress_Private& addr); |
41 | 41 void SendBindACKError(); |
42 void SendBindACK(bool result); | |
43 | 42 |
44 private: | 43 private: |
45 void SendRecvFromACKError(); | 44 void SendRecvFromACKError(); |
46 void SendSendToACKError(); | 45 void SendSendToACKError(); |
47 | 46 |
| 47 void OnBindCompleted(int result); |
48 void OnRecvFromCompleted(int result); | 48 void OnRecvFromCompleted(int result); |
49 void OnSendToCompleted(int result); | 49 void OnSendToCompleted(int result); |
50 | 50 |
51 PepperMessageFilter* manager_; | 51 PepperMessageFilter* manager_; |
52 int32 routing_id_; | 52 int32 routing_id_; |
53 uint32 plugin_dispatcher_id_; | 53 uint32 plugin_dispatcher_id_; |
54 uint32 socket_id_; | 54 uint32 socket_id_; |
55 | 55 |
56 scoped_ptr<net::UDPServerSocket> socket_; | 56 scoped_ptr<net::UDPServerSocket> socket_; |
57 | 57 |
58 scoped_refptr<net::IOBuffer> recvfrom_buffer_; | 58 scoped_refptr<net::IOBuffer> recvfrom_buffer_; |
59 scoped_refptr<net::IOBuffer> sendto_buffer_; | 59 scoped_refptr<net::IOBuffer> sendto_buffer_; |
60 | 60 |
61 net::IPEndPoint recvfrom_address_; | 61 net::IPEndPoint recvfrom_address_; |
| 62 net::IPEndPoint bound_address_; |
62 | 63 |
63 DISALLOW_COPY_AND_ASSIGN(PepperUDPSocket); | 64 DISALLOW_COPY_AND_ASSIGN(PepperUDPSocket); |
64 }; | 65 }; |
65 | 66 |
66 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_UDP_SOCKET_H_ | 67 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_UDP_SOCKET_H_ |
OLD | NEW |