OLD | NEW |
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 #include "remoting/protocol/ice_transport.h" | 5 #include "remoting/protocol/ice_transport.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "remoting/protocol/channel_authenticator.h" | 8 #include "remoting/protocol/channel_authenticator.h" |
9 #include "remoting/protocol/channel_multiplexer.h" | 9 #include "remoting/protocol/channel_multiplexer.h" |
10 #include "remoting/protocol/pseudotcp_channel_factory.h" | 10 #include "remoting/protocol/pseudotcp_channel_factory.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 } else { | 76 } else { |
77 // Transport info was received before the channel was created. | 77 // Transport info was received before the channel was created. |
78 // This could happen due to messages being reordered on the wire. | 78 // This could happen due to messages being reordered on the wire. |
79 pending_remote_candidates_.push_back(*it); | 79 pending_remote_candidates_.push_back(*it); |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 return true; | 83 return true; |
84 } | 84 } |
85 | 85 |
86 DatagramChannelFactory* IceTransport::GetDatagramChannelFactory() { | |
87 return this; | |
88 } | |
89 | |
90 StreamChannelFactory* IceTransport::GetStreamChannelFactory() { | 86 StreamChannelFactory* IceTransport::GetStreamChannelFactory() { |
91 return secure_channel_factory_.get(); | 87 return secure_channel_factory_.get(); |
92 } | 88 } |
93 | 89 |
94 StreamChannelFactory* IceTransport::GetMultiplexedChannelFactory() { | 90 StreamChannelFactory* IceTransport::GetMultiplexedChannelFactory() { |
95 if (!channel_multiplexer_.get()) { | 91 if (!channel_multiplexer_.get()) { |
96 channel_multiplexer_.reset( | 92 channel_multiplexer_.reset( |
97 new ChannelMultiplexer(GetStreamChannelFactory(), kMuxChannelName)); | 93 new ChannelMultiplexer(GetStreamChannelFactory(), kMuxChannelName)); |
98 } | 94 } |
99 return channel_multiplexer_.get(); | 95 return channel_multiplexer_.get(); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 200 |
205 void IceTransport::SendTransportInfo() { | 201 void IceTransport::SendTransportInfo() { |
206 DCHECK(pending_transport_info_message_); | 202 DCHECK(pending_transport_info_message_); |
207 event_handler_->OnOutgoingTransportInfo( | 203 event_handler_->OnOutgoingTransportInfo( |
208 pending_transport_info_message_->ToXml()); | 204 pending_transport_info_message_->ToXml()); |
209 pending_transport_info_message_.reset(); | 205 pending_transport_info_message_.reset(); |
210 } | 206 } |
211 | 207 |
212 } // namespace protocol | 208 } // namespace protocol |
213 } // namespace remoting | 209 } // namespace remoting |
OLD | NEW |