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