| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromoting_host.h" | 5 #include "remoting/host/chromoting_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 state_(kInitial), | 77 state_(kInitial), |
| 78 protocol_config_(protocol::CandidateSessionConfig::CreateDefault()), | 78 protocol_config_(protocol::CandidateSessionConfig::CreateDefault()), |
| 79 login_backoff_(&kDefaultBackoffPolicy), | 79 login_backoff_(&kDefaultBackoffPolicy), |
| 80 authenticating_client_(false), | 80 authenticating_client_(false), |
| 81 reject_authenticating_client_(false) { | 81 reject_authenticating_client_(false) { |
| 82 DCHECK(context_); | 82 DCHECK(context_); |
| 83 DCHECK(signal_strategy); | 83 DCHECK(signal_strategy); |
| 84 DCHECK(desktop_environment_); | 84 DCHECK(desktop_environment_); |
| 85 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); | 85 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); |
| 86 | 86 |
| 87 if (!AudioCapturer::IsSupported()) { | 87 if (!AudioCapturer::IsSupported(context)) { |
| 88 // Disable audio by replacing our list of supported audio configurations | 88 // Disable audio by replacing our list of supported audio configurations |
| 89 // with the NONE config. | 89 // with the NONE config. |
| 90 protocol_config_->mutable_audio_configs()->clear(); | 90 protocol_config_->mutable_audio_configs()->clear(); |
| 91 protocol_config_->mutable_audio_configs()->push_back( | 91 protocol_config_->mutable_audio_configs()->push_back( |
| 92 protocol::ChannelConfig()); | 92 protocol::ChannelConfig()); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 | 95 |
| 96 ChromotingHost::~ChromotingHost() { | 96 ChromotingHost::~ChromotingHost() { |
| 97 DCHECK(clients_.empty()); | 97 DCHECK(clients_.empty()); |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 OnShutdown()); | 505 OnShutdown()); |
| 506 | 506 |
| 507 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); | 507 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); |
| 508 it != shutdown_tasks_.end(); ++it) { | 508 it != shutdown_tasks_.end(); ++it) { |
| 509 it->Run(); | 509 it->Run(); |
| 510 } | 510 } |
| 511 shutdown_tasks_.clear(); | 511 shutdown_tasks_.clear(); |
| 512 } | 512 } |
| 513 | 513 |
| 514 } // namespace remoting | 514 } // namespace remoting |
| OLD | NEW |