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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 | 273 |
274 if (create_pairing_ && state == protocol::ConnectionToHost::CONNECTED) { | 274 if (create_pairing_ && state == protocol::ConnectionToHost::CONNECTED) { |
275 protocol::PairingRequest request; | 275 protocol::PairingRequest request; |
276 DCHECK(!device_name_.empty()); | 276 DCHECK(!device_name_.empty()); |
277 request.set_client_name(device_name_); | 277 request.set_client_name(device_name_); |
278 client_->host_stub()->RequestPairing(request); | 278 client_->host_stub()->RequestPairing(request); |
279 } | 279 } |
280 | 280 |
281 jni_runtime_->ui_task_runner()->PostTask( | 281 jni_runtime_->ui_task_runner()->PostTask( |
282 FROM_HERE, | 282 FROM_HERE, |
283 base::Bind(&ChromotingJniRuntime::ReportConnectionStatus, | 283 base::Bind(&ChromotingJniRuntime::OnConnectionState, |
284 base::Unretained(jni_runtime_), | 284 base::Unretained(jni_runtime_), |
285 state, | 285 state, |
286 error)); | 286 error)); |
287 } | 287 } |
288 | 288 |
289 void ChromotingJniInstance::OnConnectionReady(bool ready) { | 289 void ChromotingJniInstance::OnConnectionReady(bool ready) { |
290 // We ignore this message, since OnConnectionState tells us the same thing. | 290 // We ignore this message, since OnConnectionState tells us the same thing. |
291 } | 291 } |
292 | 292 |
293 void ChromotingJniInstance::OnRouteChanged( | 293 void ChromotingJniInstance::OnRouteChanged( |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 stats->round_trip_ms()->Average()); | 495 stats->round_trip_ms()->Average()); |
496 | 496 |
497 client_status_logger_->LogStatistics(stats); | 497 client_status_logger_->LogStatistics(stats); |
498 | 498 |
499 jni_runtime_->network_task_runner()->PostDelayedTask( | 499 jni_runtime_->network_task_runner()->PostDelayedTask( |
500 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), | 500 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), |
501 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); | 501 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); |
502 } | 502 } |
503 | 503 |
504 } // namespace remoting | 504 } // namespace remoting |
OLD | NEW |