| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 DCHECK(context_); | 81 DCHECK(context_); |
| 82 DCHECK(signal_strategy); | 82 DCHECK(signal_strategy); |
| 83 DCHECK(desktop_environment_); | 83 DCHECK(desktop_environment_); |
| 84 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); | 84 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); |
| 85 | 85 |
| 86 if (!desktop_environment_->audio_capturer()) { | 86 if (!desktop_environment_->audio_capturer()) { |
| 87 // Disable audio by replacing our list of supported audio configurations | 87 // Disable audio by replacing our list of supported audio configurations |
| 88 // with the NONE config. | 88 // with the NONE config. |
| 89 protocol_config_->mutable_audio_configs()->clear(); | 89 protocol_config_->mutable_audio_configs()->clear(); |
| 90 protocol_config_->mutable_audio_configs()->push_back( | 90 protocol_config_->mutable_audio_configs()->push_back( |
| 91 protocol::ChannelConfig(protocol::ChannelConfig::TRANSPORT_NONE, | 91 protocol::ChannelConfig()); |
| 92 protocol::kDefaultStreamVersion, | |
| 93 protocol::ChannelConfig::CODEC_VERBATIM)); | |
| 94 } | 92 } |
| 95 } | 93 } |
| 96 | 94 |
| 97 ChromotingHost::~ChromotingHost() { | 95 ChromotingHost::~ChromotingHost() { |
| 98 DCHECK(clients_.empty()); | 96 DCHECK(clients_.empty()); |
| 99 } | 97 } |
| 100 | 98 |
| 101 void ChromotingHost::Start() { | 99 void ChromotingHost::Start() { |
| 102 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); | 100 DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); |
| 103 | 101 |
| (...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 OnShutdown()); | 499 OnShutdown()); |
| 502 | 500 |
| 503 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); | 501 for (std::vector<base::Closure>::iterator it = shutdown_tasks_.begin(); |
| 504 it != shutdown_tasks_.end(); ++it) { | 502 it != shutdown_tasks_.end(); ++it) { |
| 505 it->Run(); | 503 it->Run(); |
| 506 } | 504 } |
| 507 shutdown_tasks_.clear(); | 505 shutdown_tasks_.clear(); |
| 508 } | 506 } |
| 509 | 507 |
| 510 } // namespace remoting | 508 } // namespace remoting |
| OLD | NEW |