Chromium Code Reviews| 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 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 #include "remoting/base/rsa_key_pair.h" | 22 #include "remoting/base/rsa_key_pair.h" |
| 23 #include "remoting/host/chromoting_host.h" | 23 #include "remoting/host/chromoting_host.h" |
| 24 #include "remoting/host/chromoting_host_context.h" | 24 #include "remoting/host/chromoting_host_context.h" |
| 25 #include "remoting/host/host_event_logger.h" | 25 #include "remoting/host/host_event_logger.h" |
| 26 #include "remoting/host/host_secret.h" | 26 #include "remoting/host/host_secret.h" |
| 27 #include "remoting/host/host_status_logger.h" | 27 #include "remoting/host/host_status_logger.h" |
| 28 #include "remoting/host/it2me/it2me_confirmation_dialog.h" | 28 #include "remoting/host/it2me/it2me_confirmation_dialog.h" |
| 29 #include "remoting/host/it2me_desktop_environment.h" | 29 #include "remoting/host/it2me_desktop_environment.h" |
| 30 #include "remoting/host/policy_watcher.h" | 30 #include "remoting/host/policy_watcher.h" |
| 31 #include "remoting/host/register_support_host_request.h" | 31 #include "remoting/host/register_support_host_request.h" |
| 32 #include "remoting/host/screen_saver_blocker.h" | |
| 32 #include "remoting/host/service_urls.h" | 33 #include "remoting/host/service_urls.h" |
| 33 #include "remoting/protocol/auth_util.h" | 34 #include "remoting/protocol/auth_util.h" |
| 34 #include "remoting/protocol/chromium_port_allocator_factory.h" | 35 #include "remoting/protocol/chromium_port_allocator_factory.h" |
| 35 #include "remoting/protocol/ice_transport.h" | 36 #include "remoting/protocol/ice_transport.h" |
| 36 #include "remoting/protocol/it2me_host_authenticator_factory.h" | 37 #include "remoting/protocol/it2me_host_authenticator_factory.h" |
| 37 #include "remoting/protocol/jingle_session_manager.h" | 38 #include "remoting/protocol/jingle_session_manager.h" |
| 38 #include "remoting/protocol/network_settings.h" | 39 #include "remoting/protocol/network_settings.h" |
| 39 #include "remoting/protocol/transport_context.h" | 40 #include "remoting/protocol/transport_context.h" |
| 40 #include "remoting/signaling/server_log_entry.h" | 41 #include "remoting/signaling/server_log_entry.h" |
| 41 | 42 |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 265 | 266 |
| 266 // Create the host. | 267 // Create the host. |
| 267 host_.reset(new ChromotingHost(desktop_environment_factory_.get(), | 268 host_.reset(new ChromotingHost(desktop_environment_factory_.get(), |
| 268 std::move(session_manager), transport_context, | 269 std::move(session_manager), transport_context, |
| 269 host_context_->audio_task_runner(), | 270 host_context_->audio_task_runner(), |
| 270 host_context_->video_encode_task_runner())); | 271 host_context_->video_encode_task_runner())); |
| 271 host_->AddStatusObserver(this); | 272 host_->AddStatusObserver(this); |
| 272 host_status_logger_.reset( | 273 host_status_logger_.reset( |
| 273 new HostStatusLogger(host_->AsWeakPtr(), ServerLogEntry::IT2ME, | 274 new HostStatusLogger(host_->AsWeakPtr(), ServerLogEntry::IT2ME, |
| 274 signal_strategy_.get(), directory_bot_jid_)); | 275 signal_strategy_.get(), directory_bot_jid_)); |
| 276 screen_saver_blocker_.reset( | |
|
Sergey Ulanov
2016/07/08 21:31:46
Do we want power-save blocker for It2Me host? I'm
Hzj_jie
2016/07/10 22:04:57
Emmm, good point.
| |
| 277 new ScreenSaverBlocker(host_->AsWeakPtr(), host_context_->Copy())); | |
| 275 | 278 |
| 276 // Create event logger. | 279 // Create event logger. |
| 277 host_event_logger_ = | 280 host_event_logger_ = |
| 278 HostEventLogger::Create(host_->AsWeakPtr(), kApplicationName); | 281 HostEventLogger::Create(host_->AsWeakPtr(), kApplicationName); |
| 279 | 282 |
| 280 // Connect signaling and start the host. | 283 // Connect signaling and start the host. |
| 281 signal_strategy_->Connect(); | 284 signal_strategy_->Connect(); |
| 282 host_->Start(xmpp_server_config_.username); | 285 host_->Start(xmpp_server_config_.username); |
| 283 | 286 |
| 284 SetState(kRequestedAccessCode, ""); | 287 SetState(kRequestedAccessCode, ""); |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 522 std::unique_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( | 525 std::unique_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( |
| 523 new It2MeConfirmationDialogFactory()); | 526 new It2MeConfirmationDialogFactory()); |
| 524 std::unique_ptr<PolicyWatcher> policy_watcher = | 527 std::unique_ptr<PolicyWatcher> policy_watcher = |
| 525 PolicyWatcher::Create(policy_service_, context->file_task_runner()); | 528 PolicyWatcher::Create(policy_service_, context->file_task_runner()); |
| 526 return new It2MeHost(std::move(context), std::move(policy_watcher), | 529 return new It2MeHost(std::move(context), std::move(policy_watcher), |
| 527 std::move(confirmation_dialog_factory), observer, | 530 std::move(confirmation_dialog_factory), observer, |
| 528 xmpp_server_config, directory_bot_jid); | 531 xmpp_server_config, directory_bot_jid); |
| 529 } | 532 } |
| 530 | 533 |
| 531 } // namespace remoting | 534 } // namespace remoting |
| OLD | NEW |