| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 login_backoff_(&kDefaultBackoffPolicy), | 85 login_backoff_(&kDefaultBackoffPolicy), |
| 86 authenticating_client_(false), | 86 authenticating_client_(false), |
| 87 reject_authenticating_client_(false), | 87 reject_authenticating_client_(false), |
| 88 enable_curtaining_(false), | 88 enable_curtaining_(false), |
| 89 weak_factory_(this) { | 89 weak_factory_(this) { |
| 90 DCHECK(network_task_runner_->BelongsToCurrentThread()); | 90 DCHECK(network_task_runner_->BelongsToCurrentThread()); |
| 91 DCHECK(signal_strategy); | 91 DCHECK(signal_strategy); |
| 92 | 92 |
| 93 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); | 93 jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); |
| 94 | 94 |
| 95 // Disable VP9 unless it is explicitly enabled via the command-line. | 95 // Enable VP9 if specified on the command-line. |
| 96 if (!CommandLine::ForCurrentProcess()->HasSwitch(kEnableVp9SwitchName)) { | 96 if (CommandLine::ForCurrentProcess()->HasSwitch(kEnableVp9SwitchName)) { |
| 97 protocol::CandidateSessionConfig::DisableVideoCodec( | 97 protocol_config_->EnableVideoCodec(protocol::ChannelConfig::CODEC_VP9); |
| 98 protocol_config_.get(), protocol::ChannelConfig::CODEC_VP9); | |
| 99 } | 98 } |
| 100 | 99 |
| 101 if (!desktop_environment_factory_->SupportsAudioCapture()) { | 100 if (!desktop_environment_factory_->SupportsAudioCapture()) { |
| 102 protocol::CandidateSessionConfig::DisableAudioChannel( | 101 protocol_config_->DisableAudioChannel(); |
| 103 protocol_config_.get()); | |
| 104 } | 102 } |
| 105 } | 103 } |
| 106 | 104 |
| 107 ChromotingHost::~ChromotingHost() { | 105 ChromotingHost::~ChromotingHost() { |
| 108 DCHECK(CalledOnValidThread()); | 106 DCHECK(CalledOnValidThread()); |
| 109 | 107 |
| 110 // Disconnect all of the clients. | 108 // Disconnect all of the clients. |
| 111 while (!clients_.empty()) { | 109 while (!clients_.empty()) { |
| 112 clients_.front()->DisconnectSession(); | 110 clients_.front()->DisconnectSession(); |
| 113 } | 111 } |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 DCHECK(CalledOnValidThread()); | 335 DCHECK(CalledOnValidThread()); |
| 338 | 336 |
| 339 while (!clients_.empty()) { | 337 while (!clients_.empty()) { |
| 340 size_t size = clients_.size(); | 338 size_t size = clients_.size(); |
| 341 clients_.front()->DisconnectSession(); | 339 clients_.front()->DisconnectSession(); |
| 342 CHECK_EQ(clients_.size(), size - 1); | 340 CHECK_EQ(clients_.size(), size - 1); |
| 343 } | 341 } |
| 344 } | 342 } |
| 345 | 343 |
| 346 } // namespace remoting | 344 } // namespace remoting |
| OLD | NEW |