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 ClientPlugin functionality. | 7 * Interface abstracting the ClientPlugin functionality. |
8 */ | 8 */ |
9 | 9 |
10 'use strict'; | 10 'use strict'; |
(...skipping 16 matching lines...) Expand all Loading... |
27 * @return {HTMLElement} The DOM element representing the remote session. | 27 * @return {HTMLElement} The DOM element representing the remote session. |
28 */ | 28 */ |
29 remoting.ClientPlugin.prototype.element = function() {}; | 29 remoting.ClientPlugin.prototype.element = function() {}; |
30 | 30 |
31 /** | 31 /** |
32 * @param {function(boolean):void} onDone Completion callback. | 32 * @param {function(boolean):void} onDone Completion callback. |
33 */ | 33 */ |
34 remoting.ClientPlugin.prototype.initialize = function(onDone) {}; | 34 remoting.ClientPlugin.prototype.initialize = function(onDone) {}; |
35 | 35 |
36 /** | 36 /** |
37 * @param {string} hostJid The jid of the host to connect to. | 37 * @param {remoting.Host} host The host to connect to. |
38 * @param {string} hostPublicKey The base64 encoded version of the host's | |
39 * public key. | |
40 * @param {string} localJid Local jid. | 38 * @param {string} localJid Local jid. |
41 * @param {string} sharedSecret The access code for IT2Me or the PIN | 39 * @param {remoting.CredentialsProvider} credentialsProvider |
42 * for Me2Me. | |
43 * @param {string} authenticationMethods Comma-separated list of | |
44 * authentication methods the client should attempt to use. | |
45 * @param {string} authenticationTag A host-specific tag to mix into | |
46 * authentication hashes. | |
47 * @param {string} clientPairingId For paired Me2Me connections, the | |
48 * pairing id for this client, as issued by the host. | |
49 * @param {string} clientPairedSecret For paired Me2Me connections, the | |
50 * paired secret for this client, as issued by the host. | |
51 */ | 40 */ |
52 remoting.ClientPlugin.prototype.connect = function( | 41 remoting.ClientPlugin.prototype.connect = |
53 hostJid, hostPublicKey, localJid, sharedSecret, | 42 function(host, localJid, credentialsProvider) {}; |
54 authenticationMethods, authenticationTag, | |
55 clientPairingId, clientPairedSecret) {}; | |
56 | 43 |
57 /** | 44 /** |
58 * @param {number} key The keycode to inject. | 45 * @param {number} key The keycode to inject. |
59 * @param {boolean} down True for press; false for a release. | 46 * @param {boolean} down True for press; false for a release. |
60 */ | 47 */ |
61 remoting.ClientPlugin.prototype.injectKeyEvent = | 48 remoting.ClientPlugin.prototype.injectKeyEvent = |
62 function(key, down) {}; | 49 function(key, down) {}; |
63 | 50 |
64 /** | 51 /** |
65 * @param {number} from | 52 * @param {number} from |
(...skipping 25 matching lines...) Expand all Loading... |
91 /** | 78 /** |
92 * Sends a clipboard item to the host. | 79 * Sends a clipboard item to the host. |
93 * | 80 * |
94 * @param {string} mimeType The MIME type of the clipboard item. | 81 * @param {string} mimeType The MIME type of the clipboard item. |
95 * @param {string} item The clipboard item. | 82 * @param {string} item The clipboard item. |
96 */ | 83 */ |
97 remoting.ClientPlugin.prototype.sendClipboardItem = | 84 remoting.ClientPlugin.prototype.sendClipboardItem = |
98 function(mimeType, item) {}; | 85 function(mimeType, item) {}; |
99 | 86 |
100 /** | 87 /** |
101 * Tell the plugin to request a PIN asynchronously. | |
102 */ | |
103 remoting.ClientPlugin.prototype.useAsyncPinDialog = function() {}; | |
104 | |
105 /** | |
106 * Request that this client be paired with the current host. | 88 * Request that this client be paired with the current host. |
107 * | 89 * |
108 * @param {string} clientName The human-readable name of the client. | 90 * @param {string} clientName The human-readable name of the client. |
109 * @param {function(string, string):void} onDone Callback to receive the | 91 * @param {function(string, string):void} onDone Callback to receive the |
110 * client id and shared secret when they are available. | 92 * client id and shared secret when they are available. |
111 */ | 93 */ |
112 remoting.ClientPlugin.prototype.requestPairing = | 94 remoting.ClientPlugin.prototype.requestPairing = |
113 function(clientName, onDone) {}; | 95 function(clientName, onDone) {}; |
114 | 96 |
115 /** | 97 /** |
116 * Called when a PIN is obtained from the user. | |
117 * | |
118 * @param {string} pin The PIN. | |
119 */ | |
120 remoting.ClientPlugin.prototype.onPinFetched = function(pin) {}; | |
121 | |
122 /** | |
123 * Allows automatic mouse-lock. | 98 * Allows automatic mouse-lock. |
124 */ | 99 */ |
125 remoting.ClientPlugin.prototype.allowMouseLock = function() {}; | 100 remoting.ClientPlugin.prototype.allowMouseLock = function() {}; |
126 | 101 |
127 /** | 102 /** |
128 * Sets the third party authentication token and shared secret. | |
129 * | |
130 * @param {string} token The token received from the token URL. | |
131 * @param {string} sharedSecret Shared secret received from the token URL. | |
132 */ | |
133 remoting.ClientPlugin.prototype.onThirdPartyTokenFetched = | |
134 function(token, sharedSecret) {}; | |
135 | |
136 /** | |
137 * @param {boolean} pause True to pause the audio stream; false to resume it. | 103 * @param {boolean} pause True to pause the audio stream; false to resume it. |
138 */ | 104 */ |
139 remoting.ClientPlugin.prototype.pauseAudio = function(pause) {}; | 105 remoting.ClientPlugin.prototype.pauseAudio = function(pause) {}; |
140 | 106 |
141 /** | 107 /** |
142 * @param {boolean} pause True to pause the video stream; false to resume it. | 108 * @param {boolean} pause True to pause the video stream; false to resume it. |
143 */ | 109 */ |
144 remoting.ClientPlugin.prototype.pauseVideo = function(pause) {}; | 110 remoting.ClientPlugin.prototype.pauseVideo = function(pause) {}; |
145 | 111 |
146 /** | 112 /** |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 /** | 182 /** |
217 * @param {function(string, number, number):void} handler Callback for | 183 * @param {function(string, number, number):void} handler Callback for |
218 * processing large mouse cursor images. The first parameter is a data: | 184 * processing large mouse cursor images. The first parameter is a data: |
219 * URL encoding the mouse cursor; the second and third parameters are | 185 * URL encoding the mouse cursor; the second and third parameters are |
220 * the cursor hotspot's x- and y-coordinates, respectively. | 186 * the cursor hotspot's x- and y-coordinates, respectively. |
221 */ | 187 */ |
222 remoting.ClientPlugin.prototype.setMouseCursorHandler = | 188 remoting.ClientPlugin.prototype.setMouseCursorHandler = |
223 function(handler) {}; | 189 function(handler) {}; |
224 | 190 |
225 /** | 191 /** |
226 * @param {function(string, string, string):void} handler Callback for | |
227 * fetching third-party tokens. The first parameter is the token URL; the | |
228 * second is the public key of the host; the third is the OAuth2 scope | |
229 * being requested. | |
230 */ | |
231 remoting.ClientPlugin.prototype.setFetchThirdPartyTokenHandler = | |
232 function(handler) {}; | |
233 | |
234 /** | |
235 * @param {function(boolean):void} handler Callback for fetching a PIN from | |
236 * the user. The parameter is true if PIN pairing is supported by the | |
237 * host, or false otherwise. | |
238 */ | |
239 remoting.ClientPlugin.prototype.setFetchPinHandler = | |
240 function(handler) {}; | |
241 | |
242 /** | |
243 * @param {function({rects:Array<Array<number>>}):void|null} handler Callback | 192 * @param {function({rects:Array<Array<number>>}):void|null} handler Callback |
244 * to receive dirty region information for each video frame, for debugging. | 193 * to receive dirty region information for each video frame, for debugging. |
245 */ | 194 */ |
246 remoting.ClientPlugin.prototype.setDebugDirtyRegionHandler = | 195 remoting.ClientPlugin.prototype.setDebugDirtyRegionHandler = |
247 function(handler) {}; | 196 function(handler) {}; |
248 | 197 |
249 | 198 |
250 /** | 199 /** |
251 * Set of features for which hasFeature() can be used to test. | 200 * Set of features for which hasFeature() can be used to test. |
252 * | 201 * |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 /** | 237 /** |
289 * Preload the plugin to make instantiation faster when the user tries | 238 * Preload the plugin to make instantiation faster when the user tries |
290 * to connect. | 239 * to connect. |
291 */ | 240 */ |
292 remoting.ClientPluginFactory.prototype.preloadPlugin = function() {}; | 241 remoting.ClientPluginFactory.prototype.preloadPlugin = function() {}; |
293 | 242 |
294 /** | 243 /** |
295 * @type {remoting.ClientPluginFactory} | 244 * @type {remoting.ClientPluginFactory} |
296 */ | 245 */ |
297 remoting.ClientPlugin.factory = null; | 246 remoting.ClientPlugin.factory = null; |
OLD | NEW |