| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * Interface abstracting the SessionConnector functionality. | 7 * Interface abstracting the SessionConnector functionality. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| 11 | 11 |
| 12 /** @suppress {duplicate} */ | 12 /** @suppress {duplicate} */ |
| 13 var remoting = remoting || {}; | 13 var remoting = remoting || {}; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * @interface | 16 * @interface |
| 17 */ | 17 */ |
| 18 remoting.SessionConnector = function() {}; | 18 remoting.SessionConnector = function() {}; |
| 19 | 19 |
| 20 /** | 20 /** |
| 21 * Reset the per-connection state so that the object can be re-used for a | |
| 22 * second connection. Note the none of the shared WCS state is reset. | |
| 23 */ | |
| 24 remoting.SessionConnector.prototype.reset = function() {}; | |
| 25 | |
| 26 /** | |
| 27 * Initiate a Me2Me connection. | 21 * Initiate a Me2Me connection. |
| 28 * | 22 * |
| 29 * @param {remoting.Host} host The Me2Me host to which to connect. | 23 * @param {remoting.Host} host The Me2Me host to which to connect. |
| 30 * @param {function(boolean, function(string):void):void} fetchPin Function to | 24 * @param {function(boolean, function(string):void):void} fetchPin Function to |
| 31 * interactively obtain the PIN from the user. | 25 * interactively obtain the PIN from the user. |
| 32 * @param {function(string, string, string, | 26 * @param {function(string, string, string, |
| 33 * function(string, string): void): void} | 27 * function(string, string): void): void} |
| 34 * fetchThirdPartyToken Function to obtain a token from a third party | 28 * fetchThirdPartyToken Function to obtain a token from a third party |
| 35 * authentication server. | 29 * authentication server. |
| 36 * @param {string} clientPairingId The client id issued by the host when | 30 * @param {string} clientPairingId The client id issued by the host when |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // TODO(garykac): Can onExtensionMessage be removed from here? It's only | 128 // TODO(garykac): Can onExtensionMessage be removed from here? It's only |
| 135 // needed to pass to the ClientSession. Investigate why ClientSession | 129 // needed to pass to the ClientSession. Investigate why ClientSession |
| 136 // needs this. | 130 // needs this. |
| 137 function(clientContainer, onConnected, onError, onExtensionMessage, | 131 function(clientContainer, onConnected, onError, onExtensionMessage, |
| 138 onConnectionFailed, requiredCapabilities, defaultRemapKeys) {}; | 132 onConnectionFailed, requiredCapabilities, defaultRemapKeys) {}; |
| 139 | 133 |
| 140 /** | 134 /** |
| 141 * @type {remoting.SessionConnectorFactory} | 135 * @type {remoting.SessionConnectorFactory} |
| 142 */ | 136 */ |
| 143 remoting.SessionConnector.factory = null; | 137 remoting.SessionConnector.factory = null; |
| OLD | NEW |