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

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

Issue 1412313006: Remove remoting::protocol::Transport interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@transport_session.h
Patch Set: Created 5 years, 1 month 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
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_ICE_TRANSPORT_FACTORY_H_ 5 #ifndef REMOTING_PROTOCOL_ICE_TRANSPORT_FACTORY_H_
6 #define REMOTING_PROTOCOL_ICE_TRANSPORT_FACTORY_H_ 6 #define REMOTING_PROTOCOL_ICE_TRANSPORT_FACTORY_H_
7 7
8 #include <list>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "remoting/protocol/network_settings.h" 11 #include "remoting/protocol/network_settings.h"
10 #include "remoting/protocol/transport.h" 12 #include "remoting/protocol/transport.h"
13 #include "remoting/signaling/jingle_info_request.h"
11 14
12 namespace cricket { 15 namespace cricket {
13 class HttpPortAllocatorBase; 16 class HttpPortAllocatorBase;
14 } // namespace cricket 17 } // namespace cricket
15 18
16 namespace remoting { 19 namespace remoting {
17 20
18 class SignalStrategy; 21 class SignalStrategy;
19 22
20 namespace protocol { 23 namespace protocol {
21 24
22 class LibjingleTransportFactory;
23
24 class IceTransportFactory : public TransportFactory { 25 class IceTransportFactory : public TransportFactory {
25 public: 26 public:
26 IceTransportFactory( 27 IceTransportFactory(
27 SignalStrategy* signal_strategy, 28 SignalStrategy* signal_strategy,
28 scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator, 29 scoped_ptr<cricket::HttpPortAllocatorBase> port_allocator,
29 const NetworkSettings& network_settings, 30 const NetworkSettings& network_settings,
30 TransportRole role); 31 TransportRole role);
31 ~IceTransportFactory() override; 32 ~IceTransportFactory() override;
32 33
33 // TransportFactory interface. 34 // TransportFactory interface.
34 void PrepareTokens() override;
35 scoped_ptr<TransportSession> CreateTransportSession() override; 35 scoped_ptr<TransportSession> CreateTransportSession() override;
36 36
37 private: 37 private:
38 scoped_ptr<LibjingleTransportFactory> libjingle_transport_factory_; 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_;
39 54
40 DISALLOW_COPY_AND_ASSIGN(IceTransportFactory); 55 DISALLOW_COPY_AND_ASSIGN(IceTransportFactory);
41 }; 56 };
42 57
43 } // namespace protocol 58 } // namespace protocol
44 } // namespace remoting 59 } // namespace remoting
45 60
46 #endif // REMOTING_PROTOCOL_ICE_TRANSPORT_FACTORY_H_ 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