OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 REMOTING_PROTOCOL_CHROMIUM_SOCKET_FACTORY_H_ | 5 #ifndef REMOTING_PROTOCOL_CHROMIUM_SOCKET_FACTORY_H_ |
6 #define REMOTING_PROTOCOL_CHROMIUM_SOCKET_FACTORY_H_ | 6 #define REMOTING_PROTOCOL_CHROMIUM_SOCKET_FACTORY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include <stdint.h> |
| 9 |
9 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "third_party/webrtc/p2p/base/packetsocketfactory.h" | 12 #include "third_party/webrtc/p2p/base/packetsocketfactory.h" |
12 | 13 |
13 namespace remoting { | 14 namespace remoting { |
14 namespace protocol { | 15 namespace protocol { |
15 | 16 |
16 class ChromiumPacketSocketFactory : public rtc::PacketSocketFactory { | 17 class ChromiumPacketSocketFactory : public rtc::PacketSocketFactory { |
17 public: | 18 public: |
18 explicit ChromiumPacketSocketFactory(); | 19 explicit ChromiumPacketSocketFactory(); |
19 ~ChromiumPacketSocketFactory() override; | 20 ~ChromiumPacketSocketFactory() override; |
20 | 21 |
21 rtc::AsyncPacketSocket* CreateUdpSocket( | 22 rtc::AsyncPacketSocket* CreateUdpSocket( |
22 const rtc::SocketAddress& local_address, | 23 const rtc::SocketAddress& local_address, |
23 uint16 min_port, | 24 uint16_t min_port, |
24 uint16 max_port) override; | 25 uint16_t max_port) override; |
25 rtc::AsyncPacketSocket* CreateServerTcpSocket( | 26 rtc::AsyncPacketSocket* CreateServerTcpSocket( |
26 const rtc::SocketAddress& local_address, | 27 const rtc::SocketAddress& local_address, |
27 uint16 min_port, | 28 uint16_t min_port, |
28 uint16 max_port, | 29 uint16_t max_port, |
29 int opts) override; | 30 int opts) override; |
30 rtc::AsyncPacketSocket* CreateClientTcpSocket( | 31 rtc::AsyncPacketSocket* CreateClientTcpSocket( |
31 const rtc::SocketAddress& local_address, | 32 const rtc::SocketAddress& local_address, |
32 const rtc::SocketAddress& remote_address, | 33 const rtc::SocketAddress& remote_address, |
33 const rtc::ProxyInfo& proxy_info, | 34 const rtc::ProxyInfo& proxy_info, |
34 const std::string& user_agent, | 35 const std::string& user_agent, |
35 int opts) override; | 36 int opts) override; |
36 rtc::AsyncResolverInterface* CreateAsyncResolver() override; | 37 rtc::AsyncResolverInterface* CreateAsyncResolver() override; |
37 | 38 |
38 private: | 39 private: |
39 DISALLOW_COPY_AND_ASSIGN(ChromiumPacketSocketFactory); | 40 DISALLOW_COPY_AND_ASSIGN(ChromiumPacketSocketFactory); |
40 }; | 41 }; |
41 | 42 |
42 } // namespace protocol | 43 } // namespace protocol |
43 } // namespace remoting | 44 } // namespace remoting |
44 | 45 |
45 #endif // REMOTING_PROTOCOL_CHROMIUM_SOCKET_FACTORY_H_ | 46 #endif // REMOTING_PROTOCOL_CHROMIUM_SOCKET_FACTORY_H_ |
OLD | NEW |