Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: remoting/host/chromoting_host.cc

Issue 10834446: Improve handling of NONE transport in channel configuration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/protocol/content_description.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | remoting/protocol/content_description.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698