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/input_injector.h" | |
20 #include "remoting/host/it2me/it2me_confirmation_dialog.h" | 21 #include "remoting/host/it2me/it2me_confirmation_dialog.h" |
21 #include "remoting/host/it2me_desktop_environment.h" | 22 #include "remoting/host/it2me_desktop_environment.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 { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after 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( | |
74 InputInjector::CanInjectTouch()); | |
Wez
2015/04/21 02:12:12
I thought we were holding off on enabling this for
Rintaro Kuroiwa
2015/04/22 19:55:59
Removed.
| |
72 | 75 |
73 // Start monitoring configured policies. | 76 // Start monitoring configured policies. |
74 policy_watcher_->StartWatching( | 77 policy_watcher_->StartWatching( |
75 base::Bind(&It2MeHost::OnPolicyUpdate, this), | 78 base::Bind(&It2MeHost::OnPolicyUpdate, this), |
76 base::Bind(&It2MeHost::OnPolicyError, this)); | 79 base::Bind(&It2MeHost::OnPolicyError, this)); |
77 | 80 |
78 // Switch to the network thread to start the actual connection. | 81 // Switch to the network thread to start the actual connection. |
79 host_context_->network_task_runner()->PostTask( | 82 host_context_->network_task_runner()->PostTask( |
80 FROM_HERE, base::Bind(&It2MeHost::ShowConfirmationPrompt, this)); | 83 FROM_HERE, base::Bind(&It2MeHost::ShowConfirmationPrompt, this)); |
81 } | 84 } |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
530 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( | 533 scoped_ptr<It2MeConfirmationDialogFactory> confirmation_dialog_factory( |
531 new It2MeConfirmationDialogFactory()); | 534 new It2MeConfirmationDialogFactory()); |
532 scoped_ptr<PolicyWatcher> policy_watcher = | 535 scoped_ptr<PolicyWatcher> policy_watcher = |
533 PolicyWatcher::Create(policy_service_, context->file_task_runner()); | 536 PolicyWatcher::Create(policy_service_, context->file_task_runner()); |
534 return new It2MeHost(context.Pass(), policy_watcher.Pass(), | 537 return new It2MeHost(context.Pass(), policy_watcher.Pass(), |
535 confirmation_dialog_factory.Pass(), | 538 confirmation_dialog_factory.Pass(), |
536 observer, xmpp_server_config, directory_bot_jid); | 539 observer, xmpp_server_config, directory_bot_jid); |
537 } | 540 } |
538 | 541 |
539 } // namespace remoting | 542 } // namespace remoting |
OLD | NEW |