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.
5 #ifndef REMOTING_HOST_CHROMIUM_PORT_ALLOCATOR_FACTORY_H_
6 #define REMOTING_HOST_CHROMIUM_PORT_ALLOCATOR_FACTORY_H_
8 #include "base/memory/ref_counted.h"
9 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h"
12 class URLRequestContextGetter
;
18 struct NetworkSettings
;
19 } // namespace protocol
21 class ChromiumPortAllocatorFactory
22 : public webrtc::PortAllocatorFactoryInterface
{
24 static rtc::scoped_refptr
<webrtc::PortAllocatorFactoryInterface
> Create(
25 const protocol::NetworkSettings
& network_settings
,
26 scoped_refptr
<net::URLRequestContextGetter
> url_request_context_getter
);
28 // webrtc::PortAllocatorFactoryInterface implementation.
29 cricket::PortAllocator
* CreatePortAllocator(
30 const std::vector
<StunConfiguration
>& stun_servers
,
31 const std::vector
<TurnConfiguration
>& turn_configurations
) override
;
34 ChromiumPortAllocatorFactory(
35 const protocol::NetworkSettings
& network_settings
,
36 scoped_refptr
<net::URLRequestContextGetter
> url_request_context_getter
);
37 ~ChromiumPortAllocatorFactory() override
;
40 const protocol::NetworkSettings
& network_settings_
;
41 scoped_refptr
<net::URLRequestContextGetter
> url_request_context_getter_
;
43 DISALLOW_COPY_AND_ASSIGN(ChromiumPortAllocatorFactory
);
46 } // namespace remoting
48 #endif // REMOTING_HOST_CHROMIUM_PORT_ALLOCATOR_FACTORY_H_