| 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 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 connected_ = false; | 117 connected_ = false; |
| 118 } | 118 } |
| 119 | 119 |
| 120 // |client_| must be torn down before |signaling_|. | 120 // |client_| must be torn down before |signaling_|. |
| 121 client_.reset(); | 121 client_.reset(); |
| 122 video_renderer_.reset(); | 122 video_renderer_.reset(); |
| 123 view_.reset(); | 123 view_.reset(); |
| 124 signaling_.reset(); | 124 signaling_.reset(); |
| 125 perf_tracker_.reset(); | 125 perf_tracker_.reset(); |
| 126 client_context_.reset(); | 126 client_context_.reset(); |
| 127 |
| 128 weak_factory_.InvalidateWeakPtrs(); |
| 127 } | 129 } |
| 128 | 130 |
| 129 void ChromotingJniInstance::FetchThirdPartyToken( | 131 void ChromotingJniInstance::FetchThirdPartyToken( |
| 130 const std::string& host_public_key, | 132 const std::string& host_public_key, |
| 131 const std::string& token_url, | 133 const std::string& token_url, |
| 132 const std::string& scope, | 134 const std::string& scope, |
| 133 const protocol::ThirdPartyTokenFetchedCallback& token_fetched_callback) { | 135 const protocol::ThirdPartyTokenFetchedCallback& token_fetched_callback) { |
| 134 DCHECK(jni_runtime_->network_task_runner()->BelongsToCurrentThread()); | 136 DCHECK(jni_runtime_->network_task_runner()->BelongsToCurrentThread()); |
| 135 DCHECK(third_party_token_fetched_callback_.is_null()); | 137 DCHECK(third_party_token_fetched_callback_.is_null()); |
| 136 | 138 |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 perf_tracker_->round_trip_ms().Max()); | 519 perf_tracker_->round_trip_ms().Max()); |
| 518 | 520 |
| 519 jni_runtime_->logger()->LogStatistics(perf_tracker_.get()); | 521 jni_runtime_->logger()->LogStatistics(perf_tracker_.get()); |
| 520 | 522 |
| 521 jni_runtime_->network_task_runner()->PostDelayedTask( | 523 jni_runtime_->network_task_runner()->PostDelayedTask( |
| 522 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), | 524 FROM_HERE, base::Bind(&ChromotingJniInstance::LogPerfStats, this), |
| 523 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); | 525 base::TimeDelta::FromMilliseconds(kPerfStatsIntervalMs)); |
| 524 } | 526 } |
| 525 | 527 |
| 526 } // namespace remoting | 528 } // namespace remoting |
| OLD | NEW |