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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // TODO(garykac): Can onExtensionMessage be removed from here? It's only | 130 // TODO(garykac): Can onExtensionMessage be removed from here? It's only |
137 // needed to pass to the ClientSession. Investigate why ClientSession | 131 // needed to pass to the ClientSession. Investigate why ClientSession |
138 // needs this. | 132 // needs this. |
139 function(clientContainer, onConnected, onError, onExtensionMessage, | 133 function(clientContainer, onConnected, onError, onExtensionMessage, |
140 onConnectionFailed, requiredCapabilities, defaultRemapKeys) {}; | 134 onConnectionFailed, requiredCapabilities, defaultRemapKeys) {}; |
141 | 135 |
142 /** | 136 /** |
143 * @type {remoting.SessionConnectorFactory} | 137 * @type {remoting.SessionConnectorFactory} |
144 */ | 138 */ |
145 remoting.SessionConnector.factory = null; | 139 remoting.SessionConnector.factory = null; |
OLD | NEW |