OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/jni/chromoting_jni_instance.h" | 5 #include "remoting/client/jni/chromoting_jni_instance.h" |
6 | 6 |
7 #include <android/log.h> | 7 #include <android/log.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 base::Bind(&ChromotingJniRuntime::ReportConnectionStatus, | 209 base::Bind(&ChromotingJniRuntime::ReportConnectionStatus, |
210 base::Unretained(jni_runtime_), | 210 base::Unretained(jni_runtime_), |
211 state, | 211 state, |
212 error)); | 212 error)); |
213 } | 213 } |
214 | 214 |
215 void ChromotingJniInstance::OnConnectionReady(bool ready) { | 215 void ChromotingJniInstance::OnConnectionReady(bool ready) { |
216 // We ignore this message, since OnConnectionState tells us the same thing. | 216 // We ignore this message, since OnConnectionState tells us the same thing. |
217 } | 217 } |
218 | 218 |
| 219 void ChromotingJniInstance::OnRouteChanged( |
| 220 const std::string& channel_name, |
| 221 const protocol::TransportRoute& route) { |
| 222 std::string message = "Channel " + channel_name + " using " + |
| 223 protocol::TransportRoute::GetTypeString(route.type) + " connection."; |
| 224 __android_log_print(ANDROID_LOG_INFO, "route", "%s", message.c_str()); |
| 225 } |
| 226 |
219 void ChromotingJniInstance::SetCapabilities(const std::string& capabilities) { | 227 void ChromotingJniInstance::SetCapabilities(const std::string& capabilities) { |
220 NOTIMPLEMENTED(); | 228 NOTIMPLEMENTED(); |
221 } | 229 } |
222 | 230 |
223 void ChromotingJniInstance::SetPairingResponse( | 231 void ChromotingJniInstance::SetPairingResponse( |
224 const protocol::PairingResponse& response) { | 232 const protocol::PairingResponse& response) { |
225 | 233 |
226 jni_runtime_->ui_task_runner()->PostTask( | 234 jni_runtime_->ui_task_runner()->PostTask( |
227 FROM_HERE, | 235 FROM_HERE, |
228 base::Bind(&ChromotingJniRuntime::CommitPairingCredentials, | 236 base::Bind(&ChromotingJniRuntime::CommitPairingCredentials, |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 stats->video_decode_ms()->Average(), | 384 stats->video_decode_ms()->Average(), |
377 stats->video_paint_ms()->Average(), | 385 stats->video_paint_ms()->Average(), |
378 stats->round_trip_ms()->Average()); | 386 stats->round_trip_ms()->Average()); |
379 | 387 |
380 jni_runtime_->network_task_runner()->PostDelayedTask( | 388 jni_runtime_->network_task_runner()->PostDelayedTask( |
381 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), | 389 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), |
382 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); | 390 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); |
383 } | 391 } |
384 | 392 |
385 } // namespace remoting | 393 } // namespace remoting |
OLD | NEW |