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