Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: remoting/webapp/session_connector_interface.js

Issue 552403004: Interfaceify ClientPlugin in preparation for mocking it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Interfaceify more classes. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
Sergey Ulanov 2014/09/16 02:02:51 year
Jamie 2014/09/16 16:23:21 Done.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview
7 * Interface abstracting the SessionConnector functionality.
8 */
9
10 'use strict';
11
12 /** @suppress {duplicate} */
13 var remoting = remoting || {};
14
15 /**
16 * @interface
17 */
18 remoting.SessionConnectorInterface = function() {};
Sergey Ulanov 2014/09/16 02:02:51 Same comment as for ClientPluginInterface. Ideally
Jamie 2014/09/16 16:23:21 Agreed; see above.
19
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.SessionConnectorInterface.prototype.reset = function() {};
25
26 /**
27 * Initiate a Me2Me connection.
28 *
29 * @param {remoting.Host} host The Me2Me host to which to connect.
30 * @param {function(boolean, function(string):void):void} fetchPin Function to
31 * interactively obtain the PIN from the user.
32 * @param {function(string, string, string,
33 * function(string, string): void): void}
34 * fetchThirdPartyToken Function to obtain a token from a third party
35 * authenticaiton server.
36 * @param {string} clientPairingId The client id issued by the host when
37 * this device was paired, if it is already paired.
38 * @param {string} clientPairedSecret The shared secret issued by the host when
39 * this device was paired, if it is already paired.
40 * @return {void} Nothing.
41 */
42 remoting.SessionConnectorInterface.prototype.connectMe2Me =
43 function(host, fetchPin, fetchThirdPartyToken,
44 clientPairingId, clientPairedSecret) {};
45
46 /**
47 * Update the pairing info so that the reconnect function will work correctly.
48 *
49 * @param {string} clientId The paired client id.
50 * @param {string} sharedSecret The shared secret.
51 */
52 remoting.SessionConnectorInterface.prototype.updatePairingInfo =
53 function(clientId, sharedSecret) {};
54
55 /**
56 * Initiate an IT2Me connection.
57 *
58 * @param {string} accessCode The access code as entered by the user.
59 * @return {void} Nothing.
60 */
61 remoting.SessionConnectorInterface.prototype.connectIT2Me =
62 function(accessCode) {};
63
64 /**
65 * Reconnect a closed connection.
66 *
67 * @return {void} Nothing.
68 */
69 remoting.SessionConnectorInterface.prototype.reconnect = function() {};
70
71 /**
72 * Cancel a connection-in-progress.
73 */
74 remoting.SessionConnectorInterface.prototype.cancel = function() {};
75
76 /**
77 * Get the connection mode (Me2Me or IT2Me)
78 *
79 * @return {remoting.ClientSession.Mode}
80 */
81 remoting.SessionConnectorInterface.prototype.getConnectionMode = function() {};
82
83 /**
84 * Get host ID.
85 *
86 * @return {string}
87 */
88 remoting.SessionConnectorInterface.prototype.getHostId = function() {};
89
90
91 /**
92 * @interface
93 */
94 remoting.SessionConnectorFactory = function() {};
95
96 /**
97 * @param {HTMLElement} clientContainer Container element for the client view.
98 * @param {function(remoting.ClientSession):void} onConnected Callback on
99 * success.
100 * @param {function(remoting.Error):void} onError Callback on error.
101 * @param {function(string, string):boolean} onExtensionMessage The handler for
102 * protocol extension messages. Returns true if a message is recognized;
103 * false otherwise.
104 * @return {remoting.SessionConnectorInterface}
105 */
106 remoting.SessionConnectorFactory.prototype.createConnector =
107 function(clientContainer, onConnected, onError, onExtensionMessage) {};
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698