| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** @suppress {duplicate} */ | 5 /** @suppress {duplicate} */ |
| 6 var remoting = remoting || {}; | 6 var remoting = remoting || {}; |
| 7 | 7 |
| 8 (function() { | 8 (function() { |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 this.retryOnHostOffline_ = true; | 257 this.retryOnHostOffline_ = true; |
| 258 | 258 |
| 259 var plugin = connectionInfo.plugin(); | 259 var plugin = connectionInfo.plugin(); |
| 260 // TODO(joedow): Do not register the GnubbyAuthHandler extension if the host | 260 // TODO(joedow): Do not register the GnubbyAuthHandler extension if the host |
| 261 // does not support security key forwarding. | 261 // does not support security key forwarding. |
| 262 plugin.extensions().register(this.gnubbyAuthHandler_); | 262 plugin.extensions().register(this.gnubbyAuthHandler_); |
| 263 this.pinDialog_.requestPairingIfNecessary(plugin); | 263 this.pinDialog_.requestPairingIfNecessary(plugin); |
| 264 | 264 |
| 265 // Drop the session after 30s of suspension. If this timeout is too short, we | 265 // Drop the session after 30s of suspension. If this timeout is too short, we |
| 266 // risk dropping a connection that is self-recoverable. If this timeout is too | 266 // risk dropping a connection that is self-recoverable. If this timeout is too |
| 267 // long, the user may lose his/her patience and just manually reconnects. | 267 // long, the user may lose their patience and just manually reconnect. |
| 268 this.desktopActivity_.getSession().dropSessionOnSuspend(30 * 1000); | 268 this.desktopActivity_.getSession().dropSessionOnSuspend(30 * 1000); |
| 269 }; | 269 }; |
| 270 | 270 |
| 271 remoting.Me2MeActivity.prototype.onDisconnected = function(error) { | 271 remoting.Me2MeActivity.prototype.onDisconnected = function(error) { |
| 272 base.dispose(this.desktopActivity_); | 272 base.dispose(this.desktopActivity_); |
| 273 this.desktopActivity_ = null; | 273 this.desktopActivity_ = null; |
| 274 | 274 |
| 275 if (error.isNone()) { | 275 if (error.isNone()) { |
| 276 this.showFinishDialog_(remoting.AppMode.CLIENT_SESSION_FINISHED_ME2ME); | 276 this.showFinishDialog_(remoting.AppMode.CLIENT_SESSION_FINISHED_ME2ME); |
| 277 } else if (remoting.AutoReconnector.shouldAutoReconnect(error)) { | 277 } else if (remoting.AutoReconnector.shouldAutoReconnect(error)) { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 }; | 472 }; |
| 473 | 473 |
| 474 remoting.AutoReconnector.prototype.dispose = function() { | 474 remoting.AutoReconnector.prototype.dispose = function() { |
| 475 base.dispose(this.networkDetector_); | 475 base.dispose(this.networkDetector_); |
| 476 this.networkDetector_ = null; | 476 this.networkDetector_ = null; |
| 477 this.reconnectCallback_ = null; | 477 this.reconnectCallback_ = null; |
| 478 this.connectingDialog_.hide(); | 478 this.connectingDialog_.hide(); |
| 479 }; | 479 }; |
| 480 | 480 |
| 481 })(); | 481 })(); |
| OLD | NEW |