| OLD | NEW |
| 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 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/callback_helpers.h" | 12 #include "base/callback_helpers.h" |
| 13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 14 #include "base/threading/platform_thread.h" | 14 #include "base/threading/platform_thread.h" |
| 15 #include "net/socket/client_socket_factory.h" | 15 #include "net/socket/client_socket_factory.h" |
| 16 #include "net/url_request/url_request_context_getter.h" | 16 #include "net/url_request/url_request_context_getter.h" |
| 17 #include "policy/policy_constants.h" | 17 #include "policy/policy_constants.h" |
| 18 #include "remoting/base/auto_thread.h" | 18 #include "remoting/base/auto_thread.h" |
| 19 #include "remoting/base/chromium_url_request.h" | 19 #include "remoting/base/chromium_url_request.h" |
| 20 #include "remoting/base/logging.h" | 20 #include "remoting/base/logging.h" |
| 21 #include "remoting/base/rsa_key_pair.h" | 21 #include "remoting/base/rsa_key_pair.h" |
| 22 #include "remoting/base/service_urls.h" |
| 22 #include "remoting/host/chromoting_host.h" | 23 #include "remoting/host/chromoting_host.h" |
| 23 #include "remoting/host/chromoting_host_context.h" | 24 #include "remoting/host/chromoting_host_context.h" |
| 24 #include "remoting/host/host_event_logger.h" | 25 #include "remoting/host/host_event_logger.h" |
| 25 #include "remoting/host/host_secret.h" | 26 #include "remoting/host/host_secret.h" |
| 26 #include "remoting/host/host_status_logger.h" | 27 #include "remoting/host/host_status_logger.h" |
| 27 #include "remoting/host/it2me/it2me_confirmation_dialog.h" | 28 #include "remoting/host/it2me/it2me_confirmation_dialog.h" |
| 28 #include "remoting/host/it2me_desktop_environment.h" | 29 #include "remoting/host/it2me_desktop_environment.h" |
| 29 #include "remoting/host/policy_watcher.h" | 30 #include "remoting/host/policy_watcher.h" |
| 30 #include "remoting/host/register_support_host_request.h" | 31 #include "remoting/host/register_support_host_request.h" |
| 31 #include "remoting/protocol/chromium_port_allocator_factory.h" | 32 #include "remoting/protocol/chromium_port_allocator_factory.h" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 protocol::NetworkSettings::kDefaultMaxPort; | 237 protocol::NetworkSettings::kDefaultMaxPort; |
| 237 } | 238 } |
| 238 | 239 |
| 239 scoped_refptr<protocol::TransportContext> transport_context = | 240 scoped_refptr<protocol::TransportContext> transport_context = |
| 240 new protocol::TransportContext( | 241 new protocol::TransportContext( |
| 241 signal_strategy_.get(), | 242 signal_strategy_.get(), |
| 242 make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory()), | 243 make_scoped_ptr(new protocol::ChromiumPortAllocatorFactory()), |
| 243 make_scoped_ptr(new ChromiumUrlRequestFactory( | 244 make_scoped_ptr(new ChromiumUrlRequestFactory( |
| 244 host_context_->url_request_context_getter())), | 245 host_context_->url_request_context_getter())), |
| 245 network_settings, protocol::TransportRole::SERVER); | 246 network_settings, protocol::TransportRole::SERVER); |
| 247 transport_context->set_ice_config_url( |
| 248 ServiceUrls::GetInstance()->ice_config_url()); |
| 246 | 249 |
| 247 scoped_ptr<protocol::SessionManager> session_manager( | 250 scoped_ptr<protocol::SessionManager> session_manager( |
| 248 new protocol::JingleSessionManager(signal_strategy_.get())); | 251 new protocol::JingleSessionManager(signal_strategy_.get())); |
| 249 | 252 |
| 250 scoped_ptr<protocol::CandidateSessionConfig> protocol_config = | 253 scoped_ptr<protocol::CandidateSessionConfig> protocol_config = |
| 251 protocol::CandidateSessionConfig::CreateDefault(); | 254 protocol::CandidateSessionConfig::CreateDefault(); |
| 252 // Disable audio by default. | 255 // Disable audio by default. |
| 253 // TODO(sergeyu): Add UI to enable it. | 256 // TODO(sergeyu): Add UI to enable it. |
| 254 protocol_config->DisableAudioChannel(); | 257 protocol_config->DisableAudioChannel(); |
| 255 session_manager->set_protocol_config(std::move(protocol_config)); | 258 session_manager->set_protocol_config(std::move(protocol_config)); |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( | 513 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( |
| 511 new It2MeConfirmationDialogFactory()); | 514 new It2MeConfirmationDialogFactory()); |
| 512 scoped_ptr<PolicyWatcher> policy_watcher = | 515 scoped_ptr<PolicyWatcher> policy_watcher = |
| 513 PolicyWatcher::Create(policy_service_, context->file_task_runner()); | 516 PolicyWatcher::Create(policy_service_, context->file_task_runner()); |
| 514 return new It2MeHost(std::move(context), std::move(policy_watcher), | 517 return new It2MeHost(std::move(context), std::move(policy_watcher), |
| 515 std::move(confirmation_dialog_factory), observer, | 518 std::move(confirmation_dialog_factory), observer, |
| 516 xmpp_server_config, directory_bot_jid); | 519 xmpp_server_config, directory_bot_jid); |
| 517 } | 520 } |
| 518 | 521 |
| 519 } // namespace remoting | 522 } // namespace remoting |
| OLD | NEW |