OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_P2P_SOCKET_HOST_UDP_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "content/browser/renderer_host/p2p/socket_host.h" | 15 #include "content/browser/renderer_host/p2p/socket_host.h" |
16 #include "content/common/p2p_sockets.h" | 16 #include "content/common/p2p_sockets.h" |
17 #include "net/base/ip_endpoint.h" | 17 #include "net/base/ip_endpoint.h" |
18 #include "net/udp/udp_server_socket.h" | 18 #include "net/udp/udp_server_socket.h" |
19 | 19 |
| 20 namespace content { |
| 21 |
20 class P2PSocketHostUdp : public P2PSocketHost { | 22 class P2PSocketHostUdp : public P2PSocketHost { |
21 public: | 23 public: |
22 P2PSocketHostUdp(IPC::Message::Sender* message_sender, | 24 P2PSocketHostUdp(IPC::Message::Sender* message_sender, |
23 int routing_id, int id); | 25 int routing_id, int id); |
24 virtual ~P2PSocketHostUdp(); | 26 virtual ~P2PSocketHostUdp(); |
25 | 27 |
26 // P2PSocketHost overrides. | 28 // P2PSocketHost overrides. |
27 virtual bool Init(const net::IPEndPoint& local_address, | 29 virtual bool Init(const net::IPEndPoint& local_address, |
28 const net::IPEndPoint& remote_address) OVERRIDE; | 30 const net::IPEndPoint& remote_address) OVERRIDE; |
29 virtual void Send(const net::IPEndPoint& to, | 31 virtual void Send(const net::IPEndPoint& to, |
(...skipping 22 matching lines...) Expand all Loading... |
52 // Set of peer for which we have received STUN binding request or | 54 // Set of peer for which we have received STUN binding request or |
53 // response or relay allocation request or response. | 55 // response or relay allocation request or response. |
54 ConnectedPeerSet connected_peers_; | 56 ConnectedPeerSet connected_peers_; |
55 | 57 |
56 net::CompletionCallbackImpl<P2PSocketHostUdp> recv_callback_; | 58 net::CompletionCallbackImpl<P2PSocketHostUdp> recv_callback_; |
57 net::CompletionCallbackImpl<P2PSocketHostUdp> send_callback_; | 59 net::CompletionCallbackImpl<P2PSocketHostUdp> send_callback_; |
58 | 60 |
59 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostUdp); | 61 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostUdp); |
60 }; | 62 }; |
61 | 63 |
| 64 } // namespace content |
| 65 |
62 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ | 66 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ |
OLD | NEW |