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

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

Issue 1521883006: Add TransportContext class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « remoting/protocol/ice_transport_channel.cc ('k') | remoting/protocol/ice_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_PROTOCOL_ICE_TRANSPORT_FACTORY_H_
6 #define REMOTING_PROTOCOL_ICE_TRANSPORT_FACTORY_H_
7
8 #include <list>
9
10 #include "base/macros.h"
11 #include "remoting/protocol/network_settings.h"
12 #include "remoting/protocol/transport.h"
13 #include "remoting/signaling/jingle_info_request.h"
14
15 namespace cricket {
16 class HttpPortAllocatorBase;
17 } // namespace cricket
18
19 namespace remoting {
20
21 class SignalStrategy;
22
23 namespace protocol {
24
25 class IceTransportFactory : public TransportFactory {
26 public:
27 IceTransportFactory(
28 SignalStrategy* signal_strategy,
29 scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator,
30 const NetworkSettings& network_settings,
31 TransportRole role);
32 ~IceTransportFactory() override;
33
34 // TransportFactory interface.
35 scoped_ptr<Transport> CreateTransport() override;
36
37 private:
38 void EnsureFreshJingleInfo();
39 void OnJingleInfo(const std::string& relay_token,
40 const std::vector<std::string>& relay_hosts,
41 const std::vector<rtc::SocketAddress>& stun_hosts);
42
43 SignalStrategy* signal_strategy_;
44 scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator_;
45 NetworkSettings network_settings_;
46 TransportRole role_;
47
48 base::TimeTicks last_jingle_info_update_time_;
49 scoped_ptr<JingleInfoRequest> jingle_info_request_;
50
51 // When there is an active |jingle_info_request_| stores list of callbacks to
52 // be called once the |jingle_info_request_| is finished.
53 std::list<base::Closure> on_jingle_info_callbacks_;
54
55 DISALLOW_COPY_AND_ASSIGN(IceTransportFactory);
56 };
57
58 } // namespace protocol
59 } // namespace remoting
60
61 #endif // REMOTING_PROTOCOL_ICE_TRANSPORT_FACTORY_H_
OLDNEW
« no previous file with comments | « remoting/protocol/ice_transport_channel.cc ('k') | remoting/protocol/ice_transport_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698