OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PORT_ALLOCATOR_FACTORY_H_ | 5 #ifndef REMOTING_PROTOCOL_CHROMIUM_PORT_ALLOCATOR_FACTORY_H_ |
6 #define REMOTING_PROTOCOL_CHROMIUM_PORT_ALLOCATOR_FACTORY_H_ | 6 #define REMOTING_PROTOCOL_CHROMIUM_PORT_ALLOCATOR_FACTORY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" |
10 #include "remoting/protocol/network_settings.h" | 11 #include "remoting/protocol/network_settings.h" |
11 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h
" | 12 #include "remoting/protocol/port_allocator_factory.h" |
12 | 13 |
13 namespace net { | 14 namespace net { |
14 class URLRequestContextGetter; | 15 class URLRequestContextGetter; |
15 } // namespace net | 16 } // namespace net |
16 | 17 |
17 namespace remoting { | 18 namespace remoting { |
18 namespace protocol { | 19 namespace protocol { |
19 | 20 |
20 class ChromiumPortAllocatorFactory | 21 class ChromiumPortAllocatorFactory : public PortAllocatorFactory { |
21 : public webrtc::PortAllocatorFactoryInterface { | |
22 public: | 22 public: |
23 static rtc::scoped_refptr<webrtc::PortAllocatorFactoryInterface> Create( | 23 static scoped_ptr<PortAllocatorFactory> Create( |
24 const NetworkSettings& network_settings, | 24 const NetworkSettings& network_settings, |
25 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); | 25 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); |
26 | 26 |
27 // webrtc::PortAllocatorFactoryInterface implementation. | 27 // PortAllocatorFactory implementation. |
28 cricket::PortAllocator* CreatePortAllocator( | 28 cricket::PortAllocator* CreatePortAllocator() override; |
29 const std::vector<StunConfiguration>& stun_servers, | |
30 const std::vector<TurnConfiguration>& turn_configurations) override; | |
31 | 29 |
32 protected: | 30 protected: |
33 ChromiumPortAllocatorFactory( | 31 ChromiumPortAllocatorFactory( |
34 const NetworkSettings& network_settings, | 32 const NetworkSettings& network_settings, |
35 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); | 33 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); |
36 ~ChromiumPortAllocatorFactory() override; | 34 ~ChromiumPortAllocatorFactory() override; |
37 | 35 |
38 private: | 36 private: |
39 NetworkSettings network_settings_; | 37 NetworkSettings network_settings_; |
40 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; | 38 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; |
41 | 39 |
42 DISALLOW_COPY_AND_ASSIGN(ChromiumPortAllocatorFactory); | 40 DISALLOW_COPY_AND_ASSIGN(ChromiumPortAllocatorFactory); |
43 }; | 41 }; |
44 | 42 |
45 } // namespace protocol | 43 } // namespace protocol |
46 } // namespace remoting | 44 } // namespace remoting |
47 | 45 |
48 #endif // REMOTING_PROTOCOL_CHROMIUM_PORT_ALLOCATOR_FACTORY_H_ | 46 #endif // REMOTING_PROTOCOL_CHROMIUM_PORT_ALLOCATOR_FACTORY_H_ |
49 | 47 |
OLD | NEW |