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/chromoting_session.h" | 5 #include "remoting/client/chromoting_session.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
270 logger_->LogSessionStateChange(ClientTelemetryLogger::TranslateState(state), | 270 logger_->LogSessionStateChange(ClientTelemetryLogger::TranslateState(state), |
271 ClientTelemetryLogger::TranslateError(error)); | 271 ClientTelemetryLogger::TranslateError(error)); |
272 | 272 |
273 if (create_pairing_ && state == protocol::ConnectionToHost::CONNECTED) { | 273 if (create_pairing_ && state == protocol::ConnectionToHost::CONNECTED) { |
274 protocol::PairingRequest request; | 274 protocol::PairingRequest request; |
275 DCHECK(!device_name_.empty()); | 275 DCHECK(!device_name_.empty()); |
276 request.set_client_name(device_name_); | 276 request.set_client_name(device_name_); |
277 client_->host_stub()->RequestPairing(request); | 277 client_->host_stub()->RequestPairing(request); |
278 } | 278 } |
279 | 279 |
280 if (state == protocol::ConnectionToHost::FAILED) { | |
281 remoting::SignalStrategy::Error err = signaling_->GetError(); | |
Yuwei
2017/07/05 21:43:41
Where is err used?
nicholss
2017/07/06 20:49:01
Sorry, this was debug, I had already removed it in
| |
282 } | |
283 | |
280 runtime_->ui_task_runner()->PostTask( | 284 runtime_->ui_task_runner()->PostTask( |
281 FROM_HERE, base::Bind(&ChromotingSession::Delegate::OnConnectionState, | 285 FROM_HERE, base::Bind(&ChromotingSession::Delegate::OnConnectionState, |
282 delegate_, state, error)); | 286 delegate_, state, error)); |
283 } | 287 } |
284 | 288 |
285 void ChromotingSession::OnConnectionReady(bool ready) { | 289 void ChromotingSession::OnConnectionReady(bool ready) { |
286 // We ignore this message, since OnConnectionState tells us the same thing. | 290 // We ignore this message, since OnConnectionState tells us the same thing. |
287 } | 291 } |
288 | 292 |
289 void ChromotingSession::OnRouteChanged(const std::string& channel_name, | 293 void ChromotingSession::OnRouteChanged(const std::string& channel_name, |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
449 video_renderer_.reset(); | 453 video_renderer_.reset(); |
450 signaling_.reset(); | 454 signaling_.reset(); |
451 perf_tracker_.reset(); | 455 perf_tracker_.reset(); |
452 client_context_.reset(); | 456 client_context_.reset(); |
453 cursor_shape_stub_.reset(); | 457 cursor_shape_stub_.reset(); |
454 | 458 |
455 weak_factory_.InvalidateWeakPtrs(); | 459 weak_factory_.InvalidateWeakPtrs(); |
456 } | 460 } |
457 | 461 |
458 } // namespace remoting | 462 } // namespace remoting |
OLD | NEW |