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

Side by Side Diff: remoting/host/it2me/it2me_host.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/host/it2me/it2me_host.h" 5 #include "remoting/host/it2me/it2me_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 nat_traversal_enabled_ ? 229 nat_traversal_enabled_ ?
230 protocol::NetworkSettings::NAT_TRAVERSAL_FULL : 230 protocol::NetworkSettings::NAT_TRAVERSAL_FULL :
231 protocol::NetworkSettings::NAT_TRAVERSAL_DISABLED); 231 protocol::NetworkSettings::NAT_TRAVERSAL_DISABLED);
232 if (!nat_traversal_enabled_) { 232 if (!nat_traversal_enabled_) {
233 network_settings.port_range.min_port = 233 network_settings.port_range.min_port =
234 protocol::NetworkSettings::kDefaultMinPort; 234 protocol::NetworkSettings::kDefaultMinPort;
235 network_settings.port_range.max_port = 235 network_settings.port_range.max_port =
236 protocol::NetworkSettings::kDefaultMaxPort; 236 protocol::NetworkSettings::kDefaultMaxPort;
237 } 237 }
238 238
239 scoped_refptr<protocol::TransportContext> transport_context = 239 scoped_refptr<protocol::TransportContext> transport_context =
garykac 2016/03/15 00:13:16 For consistency, this should be 'ice_transport_con
Sergey Ulanov 2016/03/15 20:17:31 removed webrtc_transport_context
240 new protocol::TransportContext( 240 new protocol::TransportContext(
241 signal_strategy_.get(), 241 signal_strategy_.get(),
242 make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory()), 242 make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory()),
243 make_scoped_ptr(new ChromiumUrlRequestFactory( 243 make_scoped_ptr(new ChromiumUrlRequestFactory(
244 host_context_->url_request_context_getter())), 244 host_context_->url_request_context_getter())),
245 network_settings, protocol::TransportRole::SERVER); 245 network_settings, protocol::TransportRole::SERVER);
246 246
247 scoped_ptr<protocol::SessionManager> session_manager( 247 scoped_ptr<protocol::SessionManager> session_manager(
248 new protocol::JingleSessionManager(signal_strategy_.get())); 248 new protocol::JingleSessionManager(signal_strategy_.get()));
249 249
250 scoped_ptr<protocol::CandidateSessionConfig> protocol_config = 250 scoped_ptr<protocol::CandidateSessionConfig> protocol_config =
251 protocol::CandidateSessionConfig::CreateDefault(); 251 protocol::CandidateSessionConfig::CreateDefault();
252 // Disable audio by default. 252 // Disable audio by default.
253 // TODO(sergeyu): Add UI to enable it. 253 // TODO(sergeyu): Add UI to enable it.
254 protocol_config->DisableAudioChannel(); 254 protocol_config->DisableAudioChannel();
255 session_manager->set_protocol_config(std::move(protocol_config)); 255 session_manager->set_protocol_config(std::move(protocol_config));
256 256
257 // Create the host. 257 // Create the host.
258 host_.reset(new ChromotingHost(desktop_environment_factory_.get(), 258 host_.reset(new ChromotingHost(desktop_environment_factory_.get(),
259 std::move(session_manager), transport_context, 259 std::move(session_manager), transport_context,
260 host_context_->audio_task_runner(), 260 nullptr, host_context_->audio_task_runner(),
261 host_context_->video_encode_task_runner())); 261 host_context_->video_encode_task_runner()));
262 host_->AddStatusObserver(this); 262 host_->AddStatusObserver(this);
263 host_status_logger_.reset( 263 host_status_logger_.reset(
264 new HostStatusLogger(host_->AsWeakPtr(), ServerLogEntry::IT2ME, 264 new HostStatusLogger(host_->AsWeakPtr(), ServerLogEntry::IT2ME,
265 signal_strategy_.get(), directory_bot_jid_)); 265 signal_strategy_.get(), directory_bot_jid_));
266 266
267 // Create event logger. 267 // Create event logger.
268 host_event_logger_ = 268 host_event_logger_ =
269 HostEventLogger::Create(host_->AsWeakPtr(), kApplicationName); 269 HostEventLogger::Create(host_->AsWeakPtr(), kApplicationName);
270 270
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( 510 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory(
511 new It2MeConfirmationDialogFactory()); 511 new It2MeConfirmationDialogFactory());
512 scoped_ptr<PolicyWatcher> policy_watcher = 512 scoped_ptr<PolicyWatcher> policy_watcher =
513 PolicyWatcher::Create(policy_service_, context->file_task_runner()); 513 PolicyWatcher::Create(policy_service_, context->file_task_runner());
514 return new It2MeHost(std::move(context), std::move(policy_watcher), 514 return new It2MeHost(std::move(context), std::move(policy_watcher),
515 std::move(confirmation_dialog_factory), observer, 515 std::move(confirmation_dialog_factory), observer,
516 xmpp_server_config, directory_bot_jid); 516 xmpp_server_config, directory_bot_jid);
517 } 517 }
518 518
519 } // namespace remoting 519 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698