| 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 ASYNC_PIN: 'asyncPin', |
| 59 PAUSE_VIDEO: 'pauseVideo', | 62 PAUSE_VIDEO: 'pauseVideo', |
| 60 PAUSE_AUDIO: 'pauseAudio', | 63 PAUSE_AUDIO: 'pauseAudio', |
| 61 REMAP_KEY: 'remapKey', | 64 REMAP_KEY: 'remapKey', |
| 62 SEND_CLIPBOARD_ITEM: 'sendClipboardItem', | 65 SEND_CLIPBOARD_ITEM: 'sendClipboardItem', |
| 63 TRAP_KEY: 'trapKey' | 66 TRAP_KEY: 'trapKey' |
| 64 }; | 67 }; |
| 65 | 68 |
| 66 /** | 69 /** |
| 67 * @param {remoting.ClientPlugin.Feature} feature The feature to test for. | 70 * @param {remoting.ClientPlugin.Feature} feature The feature to test for. |
| 68 * @return {boolean} True if the plugin supports the named feature. | 71 * @return {boolean} True if the plugin supports the named feature. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 */ | 126 */ |
| 124 remoting.ClientPlugin.prototype.remapKey = | 127 remoting.ClientPlugin.prototype.remapKey = |
| 125 function(fromKeycode, toKeycode) {}; | 128 function(fromKeycode, toKeycode) {}; |
| 126 | 129 |
| 127 /** | 130 /** |
| 128 * Enable/disable redirection of the specified key to the web-app. | 131 * Enable/disable redirection of the specified key to the web-app. |
| 129 * | 132 * |
| 130 * @param {number} keycode The USB-style code of the key. | 133 * @param {number} keycode The USB-style code of the key. |
| 131 * @param {Boolean} trap True to enable trapping, False to disable. | 134 * @param {Boolean} trap True to enable trapping, False to disable. |
| 132 */ | 135 */ |
| 133 remoting.ClientPlugin.prototype.trapKey = function(keycode, trap) {} | 136 remoting.ClientPlugin.prototype.trapKey = function(keycode, trap) {}; |
| 134 | 137 |
| 135 /** | 138 /** |
| 136 * Returns an associative array with a set of stats for this connection. | 139 * Returns an associative array with a set of stats for this connection. |
| 137 * | 140 * |
| 138 * @return {remoting.ClientSession.PerfStats} The connection statistics. | 141 * @return {remoting.ClientSession.PerfStats} The connection statistics. |
| 139 */ | 142 */ |
| 140 remoting.ClientPlugin.prototype.getPerfStats = function() {}; | 143 remoting.ClientPlugin.prototype.getPerfStats = function() {}; |
| 141 | 144 |
| 142 /** | 145 /** |
| 143 * Sends a clipboard item to the host. | 146 * Sends a clipboard item to the host. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 165 remoting.ClientPlugin.prototype.pauseVideo = | 168 remoting.ClientPlugin.prototype.pauseVideo = |
| 166 function(pause) {}; | 169 function(pause) {}; |
| 167 | 170 |
| 168 /** | 171 /** |
| 169 * Requests that the host pause or resume sending audio updates. | 172 * Requests that the host pause or resume sending audio updates. |
| 170 * | 173 * |
| 171 * @param {boolean} pause True to suspend audio updates, false otherwise. | 174 * @param {boolean} pause True to suspend audio updates, false otherwise. |
| 172 */ | 175 */ |
| 173 remoting.ClientPlugin.prototype.pauseAudio = | 176 remoting.ClientPlugin.prototype.pauseAudio = |
| 174 function(pause) {}; | 177 function(pause) {}; |
| 178 |
| 179 /** |
| 180 * Gives the client authenticator the PIN. |
| 181 * |
| 182 * @param {string} pin The PIN. |
| 183 */ |
| 184 remoting.ClientPlugin.prototype.onPinFetched = function(pin) {}; |
| 185 |
| 186 /** |
| 187 * Tells the plugin to ask for the PIN asynchronously. |
| 188 */ |
| 189 remoting.ClientPlugin.prototype.useAsyncPinDialog = function() {}; |
| OLD | NEW |