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

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

Issue 1545743002: Move ownership of Transport out of Session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_client
Patch Set: Created 4 years, 11 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
« no previous file with comments | « remoting/protocol/transport.cc ('k') | remoting/protocol/transport_context.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_TRANSPORT_CONTEXT_H_ 5 #ifndef REMOTING_PROTOCOL_TRANSPORT_CONTEXT_H_
6 #define REMOTING_PROTOCOL_TRANSPORT_CONTEXT_H_ 6 #define REMOTING_PROTOCOL_TRANSPORT_CONTEXT_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 19 matching lines...) Expand all
30 30
31 // TransportContext is responsible for storing all parameters required for 31 // TransportContext is responsible for storing all parameters required for
32 // P2P transport initialization. It's also responsible for making JingleInfo 32 // P2P transport initialization. It's also responsible for making JingleInfo
33 // request and creation of PortAllocators configured according to the JingleInfo 33 // request and creation of PortAllocators configured according to the JingleInfo
34 // result. 34 // result.
35 class TransportContext : public base::RefCountedThreadSafe<TransportContext> { 35 class TransportContext : public base::RefCountedThreadSafe<TransportContext> {
36 public: 36 public:
37 typedef base::Callback<void(scoped_ptr<cricket::PortAllocator> 37 typedef base::Callback<void(scoped_ptr<cricket::PortAllocator>
38 port_allocator)> CreatePortAllocatorCallback; 38 port_allocator)> CreatePortAllocatorCallback;
39 39
40 static scoped_refptr<TransportContext> ForTests(TransportRole role);
41
40 TransportContext( 42 TransportContext(
41 SignalStrategy* signal_strategy, 43 SignalStrategy* signal_strategy,
42 scoped_ptr<PortAllocatorFactory> port_allocator_factory, 44 scoped_ptr<PortAllocatorFactory> port_allocator_factory,
43 const NetworkSettings& network_settings, 45 const NetworkSettings& network_settings,
44 TransportRole role); 46 TransportRole role);
45 47
46 // Prepares to create new PortAllocator instances. It may be called while 48 // Prepares to create new PortAllocator instances. It may be called while
47 // connection is being negotiated to minimize the chance that the following 49 // connection is being negotiated to minimize the chance that the following
48 // CreatePortAllocator() will be blocking. 50 // CreatePortAllocator() will be blocking.
49 void Prepare(); 51 void Prepare();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // be called once the |jingle_info_request_| is finished. 85 // be called once the |jingle_info_request_| is finished.
84 std::list<CreatePortAllocatorCallback> pending_port_allocator_requests_; 86 std::list<CreatePortAllocatorCallback> pending_port_allocator_requests_;
85 87
86 DISALLOW_COPY_AND_ASSIGN(TransportContext); 88 DISALLOW_COPY_AND_ASSIGN(TransportContext);
87 }; 89 };
88 90
89 } // namespace protocol 91 } // namespace protocol
90 } // namespace remoting 92 } // namespace remoting
91 93
92 #endif // REMOTING_PROTOCOL_TRANSPORT_CONTEXT_H_ 94 #endif // REMOTING_PROTOCOL_TRANSPORT_CONTEXT_H_
OLDNEW
« no previous file with comments | « remoting/protocol/transport.cc ('k') | remoting/protocol/transport_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698