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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 started_(false), | 79 started_(false), |
80 protocol_config_(protocol::CandidateSessionConfig::CreateDefault()), | 80 protocol_config_(protocol::CandidateSessionConfig::CreateDefault()), |
81 login_backoff_(&kDefaultBackoffPolicy), | 81 login_backoff_(&kDefaultBackoffPolicy), |
82 authenticating_client_(false), | 82 authenticating_client_(false), |
83 reject_authenticating_client_(false), | 83 reject_authenticating_client_(false), |
84 enable_curtaining_(false), | 84 enable_curtaining_(false), |
85 weak_factory_(this) { | 85 weak_factory_(this) { |
86 DCHECK(network_task_runner_->BelongsToCurrentThread()); | 86 DCHECK(network_task_runner_->BelongsToCurrentThread()); |
87 DCHECK(signal_strategy); | 87 DCHECK(signal_strategy); |
88 | 88 |
89 // VP9 encode is not yet supported. | |
90 protocol::CandidateSessionConfig::DisableVideoCodec( | |
91 protocol_config_.get(), protocol::ChannelConfig::CODEC_VP9); | |
92 | |
93 if (!desktop_environment_factory_->SupportsAudioCapture()) { | 89 if (!desktop_environment_factory_->SupportsAudioCapture()) { |
94 protocol::CandidateSessionConfig::DisableAudioChannel( | 90 protocol_config_->DisableAudioChannel(); |
95 protocol_config_.get()); | |
96 } | 91 } |
97 } | 92 } |
98 | 93 |
99 ChromotingHost::~ChromotingHost() { | 94 ChromotingHost::~ChromotingHost() { |
100 DCHECK(CalledOnValidThread()); | 95 DCHECK(CalledOnValidThread()); |
101 | 96 |
102 // Disconnect all of the clients. | 97 // Disconnect all of the clients. |
103 while (!clients_.empty()) { | 98 while (!clients_.empty()) { |
104 clients_.front()->DisconnectSession(); | 99 clients_.front()->DisconnectSession(); |
105 } | 100 } |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 DCHECK(CalledOnValidThread()); | 324 DCHECK(CalledOnValidThread()); |
330 | 325 |
331 while (!clients_.empty()) { | 326 while (!clients_.empty()) { |
332 size_t size = clients_.size(); | 327 size_t size = clients_.size(); |
333 clients_.front()->DisconnectSession(); | 328 clients_.front()->DisconnectSession(); |
334 CHECK_EQ(clients_.size(), size - 1); | 329 CHECK_EQ(clients_.size(), size - 1); |
335 } | 330 } |
336 } | 331 } |
337 | 332 |
338 } // namespace remoting | 333 } // namespace remoting |
OLD | NEW |