OLD | NEW |
1 // Copyright (c) 2011 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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
(...skipping 19 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 void Bind(const PP_NetAddress_Private& addr); | 36 void Bind(const PP_NetAddress_Private& addr); |
37 void RecvFrom(int32_t num_bytes); | 37 void RecvFrom(int32_t num_bytes); |
38 void SendTo(const std::string& data, const PP_NetAddress_Private& addr); | 38 void SendTo(const std::string& data, const PP_NetAddress_Private& addr); |
39 | 39 |
40 private: | 40 private: |
41 void SendBindACK(bool result); | 41 void SendBindACKError(); |
42 void SendRecvFromACKError(); | 42 void SendRecvFromACKError(); |
43 void SendSendToACKError(); | 43 void SendSendToACKError(); |
44 | 44 |
| 45 void OnBindCompleted(int result); |
45 void OnRecvFromCompleted(int result); | 46 void OnRecvFromCompleted(int result); |
46 void OnSendToCompleted(int result); | 47 void OnSendToCompleted(int result); |
47 | 48 |
48 PepperMessageFilter* manager_; | 49 PepperMessageFilter* manager_; |
49 int32 routing_id_; | 50 int32 routing_id_; |
50 uint32 plugin_dispatcher_id_; | 51 uint32 plugin_dispatcher_id_; |
51 uint32 socket_id_; | 52 uint32 socket_id_; |
52 | 53 |
53 scoped_ptr<net::UDPServerSocket> socket_; | 54 scoped_ptr<net::UDPServerSocket> socket_; |
54 | 55 |
55 scoped_refptr<net::IOBuffer> recvfrom_buffer_; | 56 scoped_refptr<net::IOBuffer> recvfrom_buffer_; |
56 scoped_refptr<net::IOBuffer> sendto_buffer_; | 57 scoped_refptr<net::IOBuffer> sendto_buffer_; |
57 | 58 |
58 net::IPEndPoint recvfrom_address_; | 59 net::IPEndPoint recvfrom_address_; |
| 60 net::IPEndPoint bound_address_; |
59 | 61 |
60 DISALLOW_COPY_AND_ASSIGN(PepperUDPSocket); | 62 DISALLOW_COPY_AND_ASSIGN(PepperUDPSocket); |
61 }; | 63 }; |
62 | 64 |
63 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_UDP_SOCKET_H_ | 65 #endif // CONTENT_BROWSER_RENDERER_HOST_PEPPER_UDP_SOCKET_H_ |
OLD | NEW |