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