OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_LIBJINGLE_TRANSPORT_FACTORY_H_ | 5 #ifndef REMOTING_PROTOCOL_LIBJINGLE_TRANSPORT_FACTORY_H_ |
6 #define REMOTING_PROTOCOL_LIBJINGLE_TRANSPORT_FACTORY_H_ | 6 #define REMOTING_PROTOCOL_LIBJINGLE_TRANSPORT_FACTORY_H_ |
7 | 7 |
8 #include "remoting/protocol/transport.h" | 8 #include "remoting/protocol/transport.h" |
9 | 9 |
10 namespace cricket { | 10 namespace cricket { |
11 class HttpPortAllocatorBase; | 11 class HttpPortAllocatorBase; |
12 class PortAllocator; | 12 class PortAllocator; |
13 } // namespace cricket | 13 } // namespace cricket |
14 | 14 |
15 namespace net { | |
16 class URLRequestContextGetter; | |
17 } // namespace net | |
18 | |
15 namespace talk_base { | 19 namespace talk_base { |
16 class NetworkManager; | 20 class NetworkManager; |
17 class PacketSocketFactory; | 21 class PacketSocketFactory; |
18 } // namespace talk_base | 22 } // namespace talk_base |
19 | 23 |
20 namespace remoting { | 24 namespace remoting { |
25 | |
26 class NetworkSettings; | |
27 | |
21 namespace protocol { | 28 namespace protocol { |
22 | 29 |
23 class LibjingleTransportFactory : public TransportFactory { | 30 class LibjingleTransportFactory : public TransportFactory { |
24 public: | 31 public: |
32 static scoped_ptr<LibjingleTransportFactory> Create( | |
Sergey Ulanov
2013/06/21 00:48:13
Add comments saying that this method creates Libji
| |
33 const NetworkSettings& network_settings, | |
34 const scoped_refptr<net::URLRequestContextGetter>& | |
35 url_request_context_getter); | |
36 | |
25 // Need to use cricket::HttpPortAllocatorBase pointer for the | 37 // Need to use cricket::HttpPortAllocatorBase pointer for the |
26 // |port_allocator|, so that it is possible to configure | 38 // |port_allocator|, so that it is possible to configure |
27 // |port_allocator| with STUN/Relay addresses. | 39 // |port_allocator| with STUN/Relay addresses. |
28 // TODO(sergeyu): Reconsider this design. | 40 // TODO(sergeyu): Reconsider this design. |
29 LibjingleTransportFactory( | 41 LibjingleTransportFactory( |
30 scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator, | 42 scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator, |
31 bool incoming_only); | 43 bool incoming_only); |
32 | 44 |
33 // Creates BasicNetworkManager, ChromiumPacketSocketFactory and | 45 // Creates BasicNetworkManager, ChromiumPacketSocketFactory and |
34 // BasicPortAllocator. | 46 // BasicPortAllocator. |
(...skipping 15 matching lines...) Expand all Loading... | |
50 scoped_ptr<cricket::PortAllocator> port_allocator_; | 62 scoped_ptr<cricket::PortAllocator> port_allocator_; |
51 bool incoming_only_; | 63 bool incoming_only_; |
52 | 64 |
53 DISALLOW_COPY_AND_ASSIGN(LibjingleTransportFactory); | 65 DISALLOW_COPY_AND_ASSIGN(LibjingleTransportFactory); |
54 }; | 66 }; |
55 | 67 |
56 } // namespace protocol | 68 } // namespace protocol |
57 } // namespace remoting | 69 } // namespace remoting |
58 | 70 |
59 #endif // REMOTING_PROTOCOL_LIBJINGLE_TRANSPORT_FACTORY_H_ | 71 #endif // REMOTING_PROTOCOL_LIBJINGLE_TRANSPORT_FACTORY_H_ |
OLD | NEW |