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