OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_HOST_CHROMIUM_PORT_ALLOCATOR_FACTORY_H_ | |
6 #define REMOTING_HOST_CHROMIUM_PORT_ALLOCATOR_FACTORY_H_ | |
7 | |
8 #include "base/memory/ref_counted.h" | |
9 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h " | |
10 | |
11 namespace net { | |
12 class URLRequestContextGetter; | |
13 } // namespace net | |
14 | |
15 namespace remoting { | |
16 | |
17 struct NetworkSettings; | |
18 | |
19 class ChromiumPortAllocatorFactory | |
20 : public webrtc::PortAllocatorFactoryInterface { | |
21 public: | |
22 static talk_base::scoped_refptr<webrtc::PortAllocatorFactoryInterface> Create( | |
23 const NetworkSettings& network_settings, | |
24 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); | |
25 | |
26 // webrtc::PortAllocatorFactoryInterface implementation. | |
27 // Thought unspecified, the caller takes control of the returned | |
Sergey Ulanov
2014/07/21 17:43:13
s/Thought/Though/? (or just remove "Thought unspec
aiguha
2014/07/21 18:50:39
Agreed. I've removed the comment.
| |
28 // PortAllocator. | |
29 virtual cricket::PortAllocator* CreatePortAllocator( | |
30 const std::vector<StunConfiguration>& stun_servers, | |
31 const std::vector<TurnConfiguration>& turn_configurations) OVERRIDE; | |
32 | |
33 protected: | |
34 ChromiumPortAllocatorFactory( | |
Sergey Ulanov
2014/07/21 17:43:13
This constructor should be private - it's called o
aiguha
2014/07/21 18:50:39
Actually, in Create(), a talk_base::RefCountedObje
Sergey Ulanov
2014/07/21 18:53:01
Acknowledged.
| |
35 const NetworkSettings& network_settings, | |
36 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter); | |
37 virtual ~ChromiumPortAllocatorFactory(); | |
38 | |
39 private: | |
40 const NetworkSettings& network_settings_; | |
41 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; | |
42 }; | |
Sergey Ulanov
2014/07/21 17:43:13
add DISALLOW_COPY_AND_ASSIGN(ChromiumPortAllocator
aiguha
2014/07/21 18:50:39
Done.
| |
43 | |
44 } // namespace remoting | |
45 | |
46 #endif // REMOTING_HOST_CHROMIUM_PORT_ALLOCATOR_FACTORY_H_ | |
OLD | NEW |