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

Side by Side Diff: remoting/client/chromoting_client.cc

Issue 126123002: Show connection type in web-app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing Android implementation. Created 6 years, 11 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 | « remoting/client/chromoting_client.h ('k') | remoting/client/client_user_interface.h » ('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/client/chromoting_client.h" 5 #include "remoting/client/chromoting_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "remoting/base/capabilities.h" 8 #include "remoting/base/capabilities.h"
9 #include "remoting/client/audio_decode_scheduler.h" 9 #include "remoting/client/audio_decode_scheduler.h"
10 #include "remoting/client/audio_player.h" 10 #include "remoting/client/audio_player.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 OnChannelsConnected(); 152 OnChannelsConnected();
153 } 153 }
154 user_interface_->OnConnectionState(state, error); 154 user_interface_->OnConnectionState(state, error);
155 } 155 }
156 156
157 void ChromotingClient::OnConnectionReady(bool ready) { 157 void ChromotingClient::OnConnectionReady(bool ready) {
158 VLOG(1) << "ChromotingClient::OnConnectionReady(" << ready << ")"; 158 VLOG(1) << "ChromotingClient::OnConnectionReady(" << ready << ")";
159 user_interface_->OnConnectionReady(ready); 159 user_interface_->OnConnectionReady(ready);
160 } 160 }
161 161
162 void ChromotingClient::OnRouteChanged(const std::string& channel_name,
163 const protocol::TransportRoute& route) {
164 VLOG(0) << "Using " << protocol::TransportRoute::GetTypeString(route.type)
165 << " connection for " << channel_name << " channel";
166 user_interface_->OnRouteChanged(channel_name, route);
167 }
168
162 void ChromotingClient::OnAuthenticated() { 169 void ChromotingClient::OnAuthenticated() {
163 DCHECK(task_runner_->BelongsToCurrentThread()); 170 DCHECK(task_runner_->BelongsToCurrentThread());
164 171
165 // Initialize the decoder. 172 // Initialize the decoder.
166 rectangle_decoder_->Initialize(connection_->config()); 173 rectangle_decoder_->Initialize(connection_->config());
167 if (connection_->config().is_audio_enabled()) 174 if (connection_->config().is_audio_enabled())
168 audio_decode_scheduler_->Initialize(connection_->config()); 175 audio_decode_scheduler_->Initialize(connection_->config());
169 176
170 // Do not negotiate capabilities with the host if the host does not support 177 // Do not negotiate capabilities with the host if the host does not support
171 // them. 178 // them.
(...skipping 12 matching lines...) Expand all
184 if (connection_->config().SupportsCapabilities()) { 191 if (connection_->config().SupportsCapabilities()) {
185 VLOG(1) << "Client capabilities: " << config_.capabilities; 192 VLOG(1) << "Client capabilities: " << config_.capabilities;
186 193
187 protocol::Capabilities capabilities; 194 protocol::Capabilities capabilities;
188 capabilities.set_capabilities(config_.capabilities); 195 capabilities.set_capabilities(config_.capabilities);
189 connection_->host_stub()->SetCapabilities(capabilities); 196 connection_->host_stub()->SetCapabilities(capabilities);
190 } 197 }
191 } 198 }
192 199
193 } // namespace remoting 200 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/chromoting_client.h ('k') | remoting/client/client_user_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698