Chromium Code Reviews| 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 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * Connect set-up state machine for Me2Me and IT2Me | 7 * Connect set-up state machine for Me2Me and IT2Me |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 103 | 103 |
| 104 /** @private {remoting.ClientPlugin} */ | 104 /** @private {remoting.ClientPlugin} */ |
| 105 this.plugin_ = null; | 105 this.plugin_ = null; |
| 106 | 106 |
| 107 /** @private {remoting.ClientSession} */ | 107 /** @private {remoting.ClientSession} */ |
| 108 this.clientSession_ = null; | 108 this.clientSession_ = null; |
| 109 | 109 |
| 110 /** @private {remoting.DesktopConnectedView} */ | 110 /** @private {remoting.DesktopConnectedView} */ |
| 111 this.connectedView_ = null; | 111 this.connectedView_ = null; |
| 112 | 112 |
| 113 /** @private {XMLHttpRequest} */ | 113 /** @private {remoting.Xhr} */ |
| 114 this.pendingXhr_ = null; | 114 this.pendingXhr_ = null; |
| 115 | 115 |
| 116 /** @private {remoting.CredentialsProvider} */ | 116 /** @private {remoting.CredentialsProvider} */ |
| 117 this.credentialsProvider_ = null; | 117 this.credentialsProvider_ = null; |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 /** | 120 /** |
| 121 * Initiate a Me2Me connection. | 121 * Initiate a Me2Me connection. |
| 122 * | 122 * |
| 123 * This doesn't report host-offline errors because the connection will | 123 * This doesn't report host-offline errors because the connection will |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 var pluginContainer = this.clientContainer_.querySelector( | 324 var pluginContainer = this.clientContainer_.querySelector( |
| 325 '.client-plugin-container'); | 325 '.client-plugin-container'); |
| 326 | 326 |
| 327 this.plugin_ = remoting.ClientPlugin.factory.createPlugin( | 327 this.plugin_ = remoting.ClientPlugin.factory.createPlugin( |
| 328 pluginContainer, this.onExtensionMessage_, this.requiredCapabilities_); | 328 pluginContainer, this.onExtensionMessage_, this.requiredCapabilities_); |
| 329 | 329 |
| 330 var that = this; | 330 var that = this; |
| 331 this.host_.options.load().then(function(){ | 331 this.host_.options.load().then(function(){ |
| 332 that.plugin_.initialize(that.onPluginInitialized_.bind(that)); | 332 that.plugin_.initialize(that.onPluginInitialized_.bind(that)); |
| 333 }); | 333 }); |
| 334 this.pendingXhr_.then(this.onIT2MeHostInfo_.bind(this, hostId)); | |
|
Jamie
2015/03/16 18:06:34
Why has this been deleted entirely?
John Williams
2015/03/16 23:15:00
It was deleted in the master branch. I'm trying t
| |
| 334 }; | 335 }; |
| 335 | 336 |
| 336 /** | 337 /** |
| 337 * @param {boolean} initialized | 338 * @param {boolean} initialized |
| 339 * support-hosts query. | |
| 338 * @private | 340 * @private |
| 339 */ | 341 */ |
| 340 remoting.SessionConnectorImpl.prototype.onPluginInitialized_ = function( | 342 remoting.SessionConnectorImpl.prototype.onPluginInitialized_ = function( |
| 341 initialized) { | 343 initialized) { |
| 342 if (!initialized) { | 344 if (!initialized) { |
| 343 console.error('ERROR: remoting plugin not loaded'); | 345 console.error('ERROR: remoting plugin not loaded'); |
| 344 this.pluginError_(remoting.Error.MISSING_PLUGIN); | 346 this.pluginError_(remoting.Error.MISSING_PLUGIN); |
| 345 return; | 347 return; |
| 346 } | 348 } |
| 347 | 349 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 496 */ | 498 */ |
| 497 remoting.DefaultSessionConnectorFactory.prototype.createConnector = | 499 remoting.DefaultSessionConnectorFactory.prototype.createConnector = |
| 498 function(clientContainer, onConnected, onError, onExtensionMessage, | 500 function(clientContainer, onConnected, onError, onExtensionMessage, |
| 499 onConnectionFailed, requiredCapabilities, defaultRemapKeys) { | 501 onConnectionFailed, requiredCapabilities, defaultRemapKeys) { |
| 500 return new remoting.SessionConnectorImpl(clientContainer, onConnected, | 502 return new remoting.SessionConnectorImpl(clientContainer, onConnected, |
| 501 onError, onExtensionMessage, | 503 onError, onExtensionMessage, |
| 502 onConnectionFailed, | 504 onConnectionFailed, |
| 503 requiredCapabilities, | 505 requiredCapabilities, |
| 504 defaultRemapKeys); | 506 defaultRemapKeys); |
| 505 }; | 507 }; |
| OLD | NEW |