| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/threading/platform_thread.h" | 9 #include "base/threading/platform_thread.h" |
| 10 #include "net/socket/client_socket_factory.h" | 10 #include "net/socket/client_socket_factory.h" |
| 11 #include "policy/policy_constants.h" | 11 #include "policy/policy_constants.h" |
| 12 #include "remoting/base/auto_thread.h" | 12 #include "remoting/base/auto_thread.h" |
| 13 #include "remoting/base/logging.h" | 13 #include "remoting/base/logging.h" |
| 14 #include "remoting/base/rsa_key_pair.h" | 14 #include "remoting/base/rsa_key_pair.h" |
| 15 #include "remoting/host/chromoting_host.h" | 15 #include "remoting/host/chromoting_host.h" |
| 16 #include "remoting/host/chromoting_host_context.h" | 16 #include "remoting/host/chromoting_host_context.h" |
| 17 #include "remoting/host/host_event_logger.h" | 17 #include "remoting/host/host_event_logger.h" |
| 18 #include "remoting/host/host_secret.h" | 18 #include "remoting/host/host_secret.h" |
| 19 #include "remoting/host/host_status_logger.h" | 19 #include "remoting/host/host_status_logger.h" |
| 20 #include "remoting/host/it2me/it2me_confirmation_dialog.h" | 20 #include "remoting/host/it2me/it2me_confirmation_dialog.h" |
| 21 #include "remoting/host/it2me_desktop_environment.h" | 21 #include "remoting/host/it2me_desktop_environment.h" |
| 22 #include "remoting/host/multi_touch_capability.h" |
| 22 #include "remoting/host/policy_watcher.h" | 23 #include "remoting/host/policy_watcher.h" |
| 23 #include "remoting/host/register_support_host_request.h" | 24 #include "remoting/host/register_support_host_request.h" |
| 24 #include "remoting/host/session_manager_factory.h" | 25 #include "remoting/host/session_manager_factory.h" |
| 25 #include "remoting/protocol/it2me_host_authenticator_factory.h" | 26 #include "remoting/protocol/it2me_host_authenticator_factory.h" |
| 26 #include "remoting/protocol/network_settings.h" | 27 #include "remoting/protocol/network_settings.h" |
| 27 #include "remoting/signaling/server_log_entry.h" | 28 #include "remoting/signaling/server_log_entry.h" |
| 28 | 29 |
| 29 namespace remoting { | 30 namespace remoting { |
| 30 | 31 |
| 31 namespace { | 32 namespace { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 62 DCHECK(task_runner_->BelongsToCurrentThread()); | 63 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 63 host_context_->ui_task_runner()->PostTask( | 64 host_context_->ui_task_runner()->PostTask( |
| 64 FROM_HERE, base::Bind(&It2MeHost::Connect, this)); | 65 FROM_HERE, base::Bind(&It2MeHost::Connect, this)); |
| 65 return; | 66 return; |
| 66 } | 67 } |
| 67 | 68 |
| 68 desktop_environment_factory_.reset(new It2MeDesktopEnvironmentFactory( | 69 desktop_environment_factory_.reset(new It2MeDesktopEnvironmentFactory( |
| 69 host_context_->network_task_runner(), | 70 host_context_->network_task_runner(), |
| 70 host_context_->input_task_runner(), | 71 host_context_->input_task_runner(), |
| 71 host_context_->ui_task_runner())); | 72 host_context_->ui_task_runner())); |
| 73 desktop_environment_factory_->SetEnableMultiTouch(MultiTouchCapable()); |
| 72 | 74 |
| 73 // Start monitoring configured policies. | 75 // Start monitoring configured policies. |
| 74 policy_watcher_->StartWatching( | 76 policy_watcher_->StartWatching( |
| 75 base::Bind(&It2MeHost::OnPolicyUpdate, this), | 77 base::Bind(&It2MeHost::OnPolicyUpdate, this), |
| 76 base::Bind(&It2MeHost::OnPolicyError, this)); | 78 base::Bind(&It2MeHost::OnPolicyError, this)); |
| 77 | 79 |
| 78 // Switch to the network thread to start the actual connection. | 80 // Switch to the network thread to start the actual connection. |
| 79 host_context_->network_task_runner()->PostTask( | 81 host_context_->network_task_runner()->PostTask( |
| 80 FROM_HERE, base::Bind(&It2MeHost::ShowConfirmationPrompt, this)); | 82 FROM_HERE, base::Bind(&It2MeHost::ShowConfirmationPrompt, this)); |
| 81 } | 83 } |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( | 532 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( |
| 531 new It2MeConfirmationDialogFactory()); | 533 new It2MeConfirmationDialogFactory()); |
| 532 scoped_ptr<PolicyWatcher> policy_watcher = | 534 scoped_ptr<PolicyWatcher> policy_watcher = |
| 533 PolicyWatcher::Create(policy_service_, context->file_task_runner()); | 535 PolicyWatcher::Create(policy_service_, context->file_task_runner()); |
| 534 return new It2MeHost(context.Pass(), policy_watcher.Pass(), | 536 return new It2MeHost(context.Pass(), policy_watcher.Pass(), |
| 535 confirmation_dialog_factory.Pass(), | 537 confirmation_dialog_factory.Pass(), |
| 536 observer, xmpp_server_config, directory_bot_jid); | 538 observer, xmpp_server_config, directory_bot_jid); |
| 537 } | 539 } |
| 538 | 540 |
| 539 } // namespace remoting | 541 } // namespace remoting |
| OLD | NEW |