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

Side by Side Diff: remoting/protocol/ice_transport.cc

Issue 1800893002: Enable TURN on the host when using WebRTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/host/remoting_me2me_host.cc ('k') | remoting/protocol/transport_context.h » ('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 #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 11 matching lines...) Expand all
22 const int kTransportInfoSendDelayMs = 20; 22 const int kTransportInfoSendDelayMs = 20;
23 23
24 // Name of the multiplexed channel. 24 // Name of the multiplexed channel.
25 static const char kMuxChannelName[] = "mux"; 25 static const char kMuxChannelName[] = "mux";
26 26
27 IceTransport::IceTransport(scoped_refptr<TransportContext> transport_context, 27 IceTransport::IceTransport(scoped_refptr<TransportContext> transport_context,
28 EventHandler* event_handler) 28 EventHandler* event_handler)
29 : transport_context_(transport_context), 29 : transport_context_(transport_context),
30 event_handler_(event_handler), 30 event_handler_(event_handler),
31 weak_factory_(this) { 31 weak_factory_(this) {
32 transport_context_->set_relay_mode(TransportContext::RelayMode::GTURN);
32 transport_context->Prepare(); 33 transport_context->Prepare();
33 } 34 }
34 35
35 IceTransport::~IceTransport() { 36 IceTransport::~IceTransport() {
36 channel_multiplexer_.reset(); 37 channel_multiplexer_.reset();
37 DCHECK(channels_.empty()); 38 DCHECK(channels_.empty());
38 } 39 }
39 40
40 void IceTransport::Start( 41 void IceTransport::Start(
41 Authenticator* authenticator, 42 Authenticator* authenticator,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 send_transport_info_callback_.Run(std::move(transport_info_xml)); 199 send_transport_info_callback_.Run(std::move(transport_info_xml));
199 } 200 }
200 201
201 void IceTransport::OnChannelError(int error) { 202 void IceTransport::OnChannelError(int error) {
202 LOG(ERROR) << "Data channel failed, error=" << error; 203 LOG(ERROR) << "Data channel failed, error=" << error;
203 event_handler_->OnIceTransportError(CHANNEL_CONNECTION_ERROR); 204 event_handler_->OnIceTransportError(CHANNEL_CONNECTION_ERROR);
204 } 205 }
205 206
206 } // namespace protocol 207 } // namespace protocol
207 } // namespace remoting 208 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/protocol/transport_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698