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/content_export.h" |
16 #include "content/common/p2p_sockets.h" | 17 #include "content/common/p2p_sockets.h" |
17 #include "net/base/ip_endpoint.h" | 18 #include "net/base/ip_endpoint.h" |
18 #include "net/udp/udp_server_socket.h" | 19 #include "net/udp/udp_server_socket.h" |
19 | 20 |
20 namespace content { | 21 namespace content { |
21 | 22 |
22 class P2PSocketHostUdp : public P2PSocketHost { | 23 class CONTENT_EXPORT P2PSocketHostUdp : public P2PSocketHost { |
23 public: | 24 public: |
24 P2PSocketHostUdp(IPC::Message::Sender* message_sender, | 25 P2PSocketHostUdp(IPC::Message::Sender* message_sender, |
25 int routing_id, int id); | 26 int routing_id, int id); |
26 virtual ~P2PSocketHostUdp(); | 27 virtual ~P2PSocketHostUdp(); |
27 | 28 |
28 // P2PSocketHost overrides. | 29 // P2PSocketHost overrides. |
29 virtual bool Init(const net::IPEndPoint& local_address, | 30 virtual bool Init(const net::IPEndPoint& local_address, |
30 const net::IPEndPoint& remote_address) OVERRIDE; | 31 const net::IPEndPoint& remote_address) OVERRIDE; |
31 virtual void Send(const net::IPEndPoint& to, | 32 virtual void Send(const net::IPEndPoint& to, |
32 const std::vector<char>& data) OVERRIDE; | 33 const std::vector<char>& data) OVERRIDE; |
(...skipping 24 matching lines...) Expand all Loading... |
57 | 58 |
58 net::CompletionCallbackImpl<P2PSocketHostUdp> recv_callback_; | 59 net::CompletionCallbackImpl<P2PSocketHostUdp> recv_callback_; |
59 net::CompletionCallbackImpl<P2PSocketHostUdp> send_callback_; | 60 net::CompletionCallbackImpl<P2PSocketHostUdp> send_callback_; |
60 | 61 |
61 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostUdp); | 62 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostUdp); |
62 }; | 63 }; |
63 | 64 |
64 } // namespace content | 65 } // namespace content |
65 | 66 |
66 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ | 67 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_UDP_H_ |
OLD | NEW |