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

Side by Side Diff: remoting/protocol/webrtc_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/protocol/transport_context.cc ('k') | remoting/test/test_chromoting_client.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 #include "remoting/protocol/webrtc_transport.h" 5 #include "remoting/protocol/webrtc_transport.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 EventHandler* event_handler) 112 EventHandler* event_handler)
113 : worker_thread_(worker_thread), 113 : worker_thread_(worker_thread),
114 transport_context_(transport_context), 114 transport_context_(transport_context),
115 event_handler_(event_handler), 115 event_handler_(event_handler),
116 outgoing_data_stream_adapter_( 116 outgoing_data_stream_adapter_(
117 true, 117 true,
118 base::Bind(&WebrtcTransport::Close, base::Unretained(this))), 118 base::Bind(&WebrtcTransport::Close, base::Unretained(this))),
119 incoming_data_stream_adapter_( 119 incoming_data_stream_adapter_(
120 false, 120 false,
121 base::Bind(&WebrtcTransport::Close, base::Unretained(this))), 121 base::Bind(&WebrtcTransport::Close, base::Unretained(this))),
122 weak_factory_(this) {} 122 weak_factory_(this) {
123 transport_context_->set_relay_mode(TransportContext::RelayMode::TURN);
124 }
123 125
124 WebrtcTransport::~WebrtcTransport() {} 126 WebrtcTransport::~WebrtcTransport() {}
125 127
126 void WebrtcTransport::Start( 128 void WebrtcTransport::Start(
127 Authenticator* authenticator, 129 Authenticator* authenticator,
128 SendTransportInfoCallback send_transport_info_callback) { 130 SendTransportInfoCallback send_transport_info_callback) {
129 DCHECK(thread_checker_.CalledOnValidThread()); 131 DCHECK(thread_checker_.CalledOnValidThread());
130 DCHECK(send_transport_info_callback_.is_null()); 132 DCHECK(send_transport_info_callback_.is_null());
131 133
132 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); 134 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop();
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 peer_connection_->Close(); 491 peer_connection_->Close();
490 peer_connection_ = nullptr; 492 peer_connection_ = nullptr;
491 peer_connection_factory_ = nullptr; 493 peer_connection_factory_ = nullptr;
492 494
493 if (error != OK) 495 if (error != OK)
494 event_handler_->OnWebrtcTransportError(error); 496 event_handler_->OnWebrtcTransportError(error);
495 } 497 }
496 498
497 } // namespace protocol 499 } // namespace protocol
498 } // namespace remoting 500 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/transport_context.cc ('k') | remoting/test/test_chromoting_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698