Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Side by Side Diff: remoting/protocol/libjingle_transport_factory.h

Issue 10160013: Implement HostPortAllocator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/url_fetcher.cc ('k') | remoting/protocol/libjingle_transport_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 talk_base { 15 namespace talk_base {
16 class NetworkManager; 16 class NetworkManager;
17 class PacketSocketFactory; 17 class PacketSocketFactory;
18 } // namespace talk_base 18 } // namespace talk_base
19 19
20 namespace remoting { 20 namespace remoting {
21 namespace protocol { 21 namespace protocol {
22 22
23 class LibjingleTransportFactory : public TransportFactory { 23 class LibjingleTransportFactory : public TransportFactory {
24 public: 24 public:
25 // Need to use cricket::HttpPortAllocatorBase pointer for the
26 // |port_allocator|, so that it is possible to configure
27 // |port_allocator| with STUN/Relay addresses.
28 // TODO(sergeyu): Reconsider this design.
25 LibjingleTransportFactory( 29 LibjingleTransportFactory(
26 scoped_ptr<talk_base::NetworkManager> network_manager,
27 scoped_ptr<talk_base::PacketSocketFactory> socket_factory,
28 scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator, 30 scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator,
29 bool incoming_only); 31 bool incoming_only);
30 32
31 // Creates BasicNetworkManager, BasicPacketSocketFactory and 33 // Creates BasicNetworkManager, BasicPacketSocketFactory and
32 // BasicPortAllocator. 34 // BasicPortAllocator.
33 LibjingleTransportFactory(); 35 LibjingleTransportFactory();
34 36
35 virtual ~LibjingleTransportFactory(); 37 virtual ~LibjingleTransportFactory();
36 38
37 // TransportFactory interface. 39 // TransportFactory interface.
(...skipping 10 matching lines...) Expand all
48 scoped_ptr<cricket::PortAllocator> port_allocator_; 50 scoped_ptr<cricket::PortAllocator> port_allocator_;
49 bool incoming_only_; 51 bool incoming_only_;
50 52
51 DISALLOW_COPY_AND_ASSIGN(LibjingleTransportFactory); 53 DISALLOW_COPY_AND_ASSIGN(LibjingleTransportFactory);
52 }; 54 };
53 55
54 } // namespace protocol 56 } // namespace protocol
55 } // namespace remoting 57 } // namespace remoting
56 58
57 #endif // REMOTING_PROTOCOL_LIBJINGLE_TRANSPORT_FACTORY_H_ 59 #endif // REMOTING_PROTOCOL_LIBJINGLE_TRANSPORT_FACTORY_H_
OLDNEW
« no previous file with comments | « remoting/host/url_fetcher.cc ('k') | remoting/protocol/libjingle_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698