OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /** @suppress {duplicate} */ | 5 /** @suppress {duplicate} */ |
6 var remoting = remoting || {}; | 6 var remoting = remoting || {}; |
7 | 7 |
8 /** | 8 /** |
9 * Interface used for ClientPlugin objects. | 9 * Interface used for ClientPlugin objects. |
10 * @interface | 10 * @interface |
(...skipping 13 matching lines...) Expand all Loading... | |
24 /** @type {function(string): void} Outgoing signaling message callback. */ | 24 /** @type {function(string): void} Outgoing signaling message callback. */ |
25 remoting.ClientPlugin.prototype.onOutgoingIqHandler; | 25 remoting.ClientPlugin.prototype.onOutgoingIqHandler; |
26 /** @type {function(string): void} Debug messages callback. */ | 26 /** @type {function(string): void} Debug messages callback. */ |
27 remoting.ClientPlugin.prototype.onDebugMessageHandler; | 27 remoting.ClientPlugin.prototype.onDebugMessageHandler; |
28 /** @type {function(number, number): void} State change callback. */ | 28 /** @type {function(number, number): void} State change callback. */ |
29 remoting.ClientPlugin.prototype.onConnectionStatusUpdateHandler; | 29 remoting.ClientPlugin.prototype.onConnectionStatusUpdateHandler; |
30 /** @type {function(boolean): void} Connection ready state callback. */ | 30 /** @type {function(boolean): void} Connection ready state callback. */ |
31 remoting.ClientPlugin.prototype.onConnectionReadyHandler; | 31 remoting.ClientPlugin.prototype.onConnectionReadyHandler; |
32 /** @type {function(): void} Desktop size change callback. */ | 32 /** @type {function(): void} Desktop size change callback. */ |
33 remoting.ClientPlugin.prototype.onDesktopSizeUpdateHandler; | 33 remoting.ClientPlugin.prototype.onDesktopSizeUpdateHandler; |
34 /** @type {function(): void} Request a PIN from the user. */ | |
35 remoting.ClientPlugin.prototype.fetchPinHandler; | |
34 | 36 |
35 /** | 37 /** |
36 * Initializes the plugin asynchronously and calls specified function | 38 * Initializes the plugin asynchronously and calls specified function |
37 * when done. | 39 * when done. |
38 * | 40 * |
39 * @param {function(boolean): void} onDone Function to be called when | 41 * @param {function(boolean): void} onDone Function to be called when |
40 * the plugin is initialized. Parameter is set to true when the plugin | 42 * the plugin is initialized. Parameter is set to true when the plugin |
41 * is loaded successfully. | 43 * is loaded successfully. |
42 */ | 44 */ |
43 remoting.ClientPlugin.prototype.initialize = function(onDone) {}; | 45 remoting.ClientPlugin.prototype.initialize = function(onDone) {}; |
44 | 46 |
45 /** | 47 /** |
46 * @return {boolean} True if the plugin and web-app versions are compatible. | 48 * @return {boolean} True if the plugin and web-app versions are compatible. |
47 */ | 49 */ |
48 remoting.ClientPlugin.prototype.isSupportedVersion = function() {}; | 50 remoting.ClientPlugin.prototype.isSupportedVersion = function() {}; |
49 | 51 |
50 /** | 52 /** |
51 * Set of features for which hasFeature() can be used to test. | 53 * Set of features for which hasFeature() can be used to test. |
52 * | 54 * |
53 * @enum {string} | 55 * @enum {string} |
54 */ | 56 */ |
55 remoting.ClientPlugin.Feature = { | 57 remoting.ClientPlugin.Feature = { |
56 INJECT_KEY_EVENT: 'injectKeyEvent', | 58 INJECT_KEY_EVENT: 'injectKeyEvent', |
57 NOTIFY_CLIENT_DIMENSIONS: 'notifyClientDimensions', | 59 NOTIFY_CLIENT_DIMENSIONS: 'notifyClientDimensions', |
58 NOTIFY_CLIENT_RESOLUTION: 'notifyClientResolution', | 60 NOTIFY_CLIENT_RESOLUTION: 'notifyClientResolution', |
61 ON_PIN_FETCHED: 'onPinFetched', | |
62 USE_ASYNC_PIN_DIALOG: 'useAsyncPinDialog', | |
Sergey Ulanov
2013/03/17 20:45:50
Why do these need to be two separate features? Wou
Jamie
2013/03/18 20:28:23
+1
rmsousa
2013/03/18 21:58:01
Done.
| |
59 PAUSE_VIDEO: 'pauseVideo', | 63 PAUSE_VIDEO: 'pauseVideo', |
60 PAUSE_AUDIO: 'pauseAudio', | 64 PAUSE_AUDIO: 'pauseAudio', |
61 REMAP_KEY: 'remapKey', | 65 REMAP_KEY: 'remapKey', |
62 SEND_CLIPBOARD_ITEM: 'sendClipboardItem', | 66 SEND_CLIPBOARD_ITEM: 'sendClipboardItem', |
63 TRAP_KEY: 'trapKey' | 67 TRAP_KEY: 'trapKey' |
64 }; | 68 }; |
65 | 69 |
66 /** | 70 /** |
67 * @param {remoting.ClientPlugin.Feature} feature The feature to test for. | 71 * @param {remoting.ClientPlugin.Feature} feature The feature to test for. |
68 * @return {boolean} True if the plugin supports the named feature. | 72 * @return {boolean} True if the plugin supports the named feature. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 */ | 127 */ |
124 remoting.ClientPlugin.prototype.remapKey = | 128 remoting.ClientPlugin.prototype.remapKey = |
125 function(fromKeycode, toKeycode) {}; | 129 function(fromKeycode, toKeycode) {}; |
126 | 130 |
127 /** | 131 /** |
128 * Enable/disable redirection of the specified key to the web-app. | 132 * Enable/disable redirection of the specified key to the web-app. |
129 * | 133 * |
130 * @param {number} keycode The USB-style code of the key. | 134 * @param {number} keycode The USB-style code of the key. |
131 * @param {Boolean} trap True to enable trapping, False to disable. | 135 * @param {Boolean} trap True to enable trapping, False to disable. |
132 */ | 136 */ |
133 remoting.ClientPlugin.prototype.trapKey = function(keycode, trap) {} | 137 remoting.ClientPlugin.prototype.trapKey = function(keycode, trap) {}; |
134 | 138 |
135 /** | 139 /** |
136 * Returns an associative array with a set of stats for this connection. | 140 * Returns an associative array with a set of stats for this connection. |
137 * | 141 * |
138 * @return {remoting.ClientSession.PerfStats} The connection statistics. | 142 * @return {remoting.ClientSession.PerfStats} The connection statistics. |
139 */ | 143 */ |
140 remoting.ClientPlugin.prototype.getPerfStats = function() {}; | 144 remoting.ClientPlugin.prototype.getPerfStats = function() {}; |
141 | 145 |
142 /** | 146 /** |
143 * Sends a clipboard item to the host. | 147 * Sends a clipboard item to the host. |
(...skipping 21 matching lines...) Expand all Loading... | |
165 remoting.ClientPlugin.prototype.pauseVideo = | 169 remoting.ClientPlugin.prototype.pauseVideo = |
166 function(pause) {}; | 170 function(pause) {}; |
167 | 171 |
168 /** | 172 /** |
169 * Requests that the host pause or resume sending audio updates. | 173 * Requests that the host pause or resume sending audio updates. |
170 * | 174 * |
171 * @param {boolean} pause True to suspend audio updates, false otherwise. | 175 * @param {boolean} pause True to suspend audio updates, false otherwise. |
172 */ | 176 */ |
173 remoting.ClientPlugin.prototype.pauseAudio = | 177 remoting.ClientPlugin.prototype.pauseAudio = |
174 function(pause) {}; | 178 function(pause) {}; |
179 | |
180 /** | |
181 * Gives the client authenticator the PIN. | |
182 * | |
183 * @param {string} pin The PIN. | |
184 */ | |
185 remoting.ClientPlugin.prototype.onPinFetched = | |
186 function(pin) {}; | |
Jamie
2013/03/18 20:28:23
Nit: No need to wrap this line.
rmsousa
2013/03/18 21:58:01
Done.
| |
187 | |
188 /** | |
189 * Tells the plugin to ask for the PIN asynchronously. | |
190 */ | |
191 remoting.ClientPlugin.prototype.useAsyncPinDialog = function() {}; | |
OLD | NEW |