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/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
10 #include "base/threading/platform_thread.h" | 10 #include "base/threading/platform_thread.h" |
11 #include "net/socket/client_socket_factory.h" | 11 #include "net/socket/client_socket_factory.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/it2me_desktop_environment.h" | 19 #include "remoting/host/it2me_desktop_environment.h" |
20 #include "remoting/host/policy_hack/policy_watcher.h" | 20 #include "remoting/host/policy_hack/policy_watcher.h" |
21 #include "remoting/host/register_support_host_request.h" | 21 #include "remoting/host/register_support_host_request.h" |
22 #include "remoting/host/session_manager_factory.h" | 22 #include "remoting/host/session_manager_factory.h" |
23 #include "remoting/jingle_glue/network_settings.h" | 23 #include "remoting/jingle_glue/network_settings.h" |
24 #include "remoting/protocol/it2me_host_authenticator_factory.h" | 24 #include "remoting/protocol/it2me_host_authenticator_factory.h" |
| 25 #include "remoting/protocol/server_log_entry.h" |
25 | 26 |
26 namespace remoting { | 27 namespace remoting { |
27 | 28 |
28 namespace { | 29 namespace { |
29 | 30 |
30 // This is used for tagging system event logs. | 31 // This is used for tagging system event logs. |
31 const char kApplicationName[] = "chromoting"; | 32 const char kApplicationName[] = "chromoting"; |
32 const int kMaxLoginAttempts = 5; | 33 const int kMaxLoginAttempts = 5; |
33 | 34 |
34 } // namespace | 35 } // namespace |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 CreateHostSessionManager(signal_strategy_.get(), network_settings, | 199 CreateHostSessionManager(signal_strategy_.get(), network_settings, |
199 host_context_->url_request_context_getter()), | 200 host_context_->url_request_context_getter()), |
200 host_context_->audio_task_runner(), | 201 host_context_->audio_task_runner(), |
201 host_context_->input_task_runner(), | 202 host_context_->input_task_runner(), |
202 host_context_->video_capture_task_runner(), | 203 host_context_->video_capture_task_runner(), |
203 host_context_->video_encode_task_runner(), | 204 host_context_->video_encode_task_runner(), |
204 host_context_->network_task_runner(), | 205 host_context_->network_task_runner(), |
205 host_context_->ui_task_runner())); | 206 host_context_->ui_task_runner())); |
206 host_->AddStatusObserver(this); | 207 host_->AddStatusObserver(this); |
207 log_to_server_.reset( | 208 log_to_server_.reset( |
208 new LogToServer(host_->AsWeakPtr(), ServerLogEntry::IT2ME, | 209 new LogToServer(host_->AsWeakPtr(), protocol::ServerLogEntry::IT2ME, |
209 signal_strategy_.get(), directory_bot_jid_)); | 210 signal_strategy_.get(), directory_bot_jid_)); |
210 | 211 |
211 // Disable audio by default. | 212 // Disable audio by default. |
212 // TODO(sergeyu): Add UI to enable it. | 213 // TODO(sergeyu): Add UI to enable it. |
213 scoped_ptr<protocol::CandidateSessionConfig> protocol_config = | 214 scoped_ptr<protocol::CandidateSessionConfig> protocol_config = |
214 protocol::CandidateSessionConfig::CreateDefault(); | 215 protocol::CandidateSessionConfig::CreateDefault(); |
215 protocol::CandidateSessionConfig::DisableAudioChannel(protocol_config.get()); | 216 protocol::CandidateSessionConfig::DisableAudioChannel(protocol_config.get()); |
216 | 217 |
217 // VP9 encode is not yet supported. | 218 // VP9 encode is not yet supported. |
218 protocol::CandidateSessionConfig::DisableVideoCodec( | 219 protocol::CandidateSessionConfig::DisableVideoCodec( |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 ChromotingHostContext* context, | 470 ChromotingHostContext* context, |
470 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 471 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
471 base::WeakPtr<It2MeHost::Observer> observer, | 472 base::WeakPtr<It2MeHost::Observer> observer, |
472 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, | 473 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config, |
473 const std::string& directory_bot_jid) { | 474 const std::string& directory_bot_jid) { |
474 return new It2MeHost( | 475 return new It2MeHost( |
475 context, task_runner, observer, xmpp_server_config, directory_bot_jid); | 476 context, task_runner, observer, xmpp_server_config, directory_bot_jid); |
476 } | 477 } |
477 | 478 |
478 } // namespace remoting | 479 } // namespace remoting |
OLD | NEW |