Chromium Code Reviews| 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/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 Loading... | |
| 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(1) << "ChromotingClient::OnRouteChanged(" << channel_name << ", " | |
|
Sergey Ulanov
2014/01/07 22:58:43
nit: There is already VLOG() for this in Connectio
Jamie
2014/01/08 11:39:34
I think it's better for consistency if they are al
| |
| 165 << protocol::TransportRoute::GetTypeString(route.type) << ")"; | |
| 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 Loading... | |
| 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 |
| OLD | NEW |