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_TCP_SERVER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "content/browser/renderer_host/p2p/socket_host.h" | 14 #include "content/browser/renderer_host/p2p/socket_host.h" |
| 15 #include "content/common/content_export.h" |
15 #include "content/common/p2p_sockets.h" | 16 #include "content/common/p2p_sockets.h" |
16 #include "net/socket/tcp_server_socket.h" | 17 #include "net/socket/tcp_server_socket.h" |
17 | 18 |
18 namespace net { | 19 namespace net { |
19 class StreamSocket; | 20 class StreamSocket; |
20 } // namespace net | 21 } // namespace net |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 | 24 |
24 class P2PSocketHostTcpServer : public P2PSocketHost { | 25 class CONTENT_EXPORT P2PSocketHostTcpServer : public P2PSocketHost { |
25 public: | 26 public: |
26 P2PSocketHostTcpServer(IPC::Message::Sender* message_sender, | 27 P2PSocketHostTcpServer(IPC::Message::Sender* message_sender, |
27 int routing_id, int id); | 28 int routing_id, int id); |
28 virtual ~P2PSocketHostTcpServer(); | 29 virtual ~P2PSocketHostTcpServer(); |
29 | 30 |
30 // P2PSocketHost overrides. | 31 // P2PSocketHost overrides. |
31 virtual bool Init(const net::IPEndPoint& local_address, | 32 virtual bool Init(const net::IPEndPoint& local_address, |
32 const net::IPEndPoint& remote_address) OVERRIDE; | 33 const net::IPEndPoint& remote_address) OVERRIDE; |
33 virtual void Send(const net::IPEndPoint& to, | 34 virtual void Send(const net::IPEndPoint& to, |
34 const std::vector<char>& data) OVERRIDE; | 35 const std::vector<char>& data) OVERRIDE; |
(...skipping 20 matching lines...) Expand all Loading... |
55 AcceptedSocketsMap accepted_sockets_; | 56 AcceptedSocketsMap accepted_sockets_; |
56 | 57 |
57 net::CompletionCallbackImpl<P2PSocketHostTcpServer> accept_callback_; | 58 net::CompletionCallbackImpl<P2PSocketHostTcpServer> accept_callback_; |
58 | 59 |
59 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcpServer); | 60 DISALLOW_COPY_AND_ASSIGN(P2PSocketHostTcpServer); |
60 }; | 61 }; |
61 | 62 |
62 } // namespace content | 63 } // namespace content |
63 | 64 |
64 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_ | 65 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TCP_SERVER_H_ |
OLD | NEW |