| 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'; |
| 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 * @extends {base.Disposable} | 17 * @extends {base.Disposable} |
| 18 */ | 18 */ |
| 19 remoting.ClientPlugin = function() {}; | 19 remoting.ClientPlugin = function() {}; |
| 20 | 20 |
| 21 /** | 21 /** |
| 22 * @return {number} The width of the remote desktop, in pixels. | 22 * @return {remoting.HostDesktop} |
| 23 */ | 23 */ |
| 24 remoting.ClientPlugin.prototype.getDesktopWidth = function() {}; | 24 remoting.ClientPlugin.prototype.hostDesktop = function() {}; |
| 25 | |
| 26 /** | |
| 27 * @return {number} The height of the remote desktop, in pixels. | |
| 28 */ | |
| 29 remoting.ClientPlugin.prototype.getDesktopHeight = function() {}; | |
| 30 | |
| 31 /** | |
| 32 * @return {number} The x-DPI of the remote desktop. | |
| 33 */ | |
| 34 remoting.ClientPlugin.prototype.getDesktopXDpi = function() {}; | |
| 35 | |
| 36 /** | |
| 37 * @return {number} The y-DPI of the remote desktop. | |
| 38 */ | |
| 39 remoting.ClientPlugin.prototype.getDesktopYDpi = function() {}; | |
| 40 | 25 |
| 41 /** | 26 /** |
| 42 * @return {HTMLElement} The DOM element representing the remote session. | 27 * @return {HTMLElement} The DOM element representing the remote session. |
| 43 */ | 28 */ |
| 44 remoting.ClientPlugin.prototype.element = function() {}; | 29 remoting.ClientPlugin.prototype.element = function() {}; |
| 45 | 30 |
| 46 /** | 31 /** |
| 47 * @param {function(boolean):void} onDone Completion callback. | 32 * @param {function(boolean):void} onDone Completion callback. |
| 48 */ | 33 */ |
| 49 remoting.ClientPlugin.prototype.initialize = function(onDone) {}; | 34 remoting.ClientPlugin.prototype.initialize = function(onDone) {}; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 */ | 90 */ |
| 106 remoting.ClientPlugin.prototype.isSupportedVersion = function() {}; | 91 remoting.ClientPlugin.prototype.isSupportedVersion = function() {}; |
| 107 | 92 |
| 108 /** | 93 /** |
| 109 * @param {remoting.ClientPlugin.Feature} feature | 94 * @param {remoting.ClientPlugin.Feature} feature |
| 110 * @return {boolean} True if the plugin support the specified feature. | 95 * @return {boolean} True if the plugin support the specified feature. |
| 111 */ | 96 */ |
| 112 remoting.ClientPlugin.prototype.hasFeature = function(feature) {}; | 97 remoting.ClientPlugin.prototype.hasFeature = function(feature) {}; |
| 113 | 98 |
| 114 /** | 99 /** |
| 100 * @param {string} capability |
| 101 * @return {boolean} True if the host support the specified capability. |
| 102 */ |
| 103 remoting.ClientPlugin.prototype.hasCapability = function(capability) {}; |
| 104 |
| 105 /** |
| 115 * Sends a clipboard item to the host. | 106 * Sends a clipboard item to the host. |
| 116 * | 107 * |
| 117 * @param {string} mimeType The MIME type of the clipboard item. | 108 * @param {string} mimeType The MIME type of the clipboard item. |
| 118 * @param {string} item The clipboard item. | 109 * @param {string} item The clipboard item. |
| 119 */ | 110 */ |
| 120 remoting.ClientPlugin.prototype.sendClipboardItem = | 111 remoting.ClientPlugin.prototype.sendClipboardItem = |
| 121 function(mimeType, item) {}; | 112 function(mimeType, item) {}; |
| 122 | 113 |
| 123 /** | 114 /** |
| 124 * Tell the plugin to request a PIN asynchronously. | 115 * Tell the plugin to request a PIN asynchronously. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 remoting.ClientPlugin.prototype.setRouteChangedHandler = function(handler) {}; | 200 remoting.ClientPlugin.prototype.setRouteChangedHandler = function(handler) {}; |
| 210 | 201 |
| 211 /** | 202 /** |
| 212 * @param {function(boolean):void} handler Callback for connection readiness | 203 * @param {function(boolean):void} handler Callback for connection readiness |
| 213 * notifications. | 204 * notifications. |
| 214 */ | 205 */ |
| 215 remoting.ClientPlugin.prototype.setConnectionReadyHandler = | 206 remoting.ClientPlugin.prototype.setConnectionReadyHandler = |
| 216 function(handler) {}; | 207 function(handler) {}; |
| 217 | 208 |
| 218 /** | 209 /** |
| 219 * @param {function():void} handler Callback for desktop size change | |
| 220 * notifications. | |
| 221 */ | |
| 222 remoting.ClientPlugin.prototype.setDesktopSizeUpdateHandler = | |
| 223 function(handler) {}; | |
| 224 | |
| 225 /** | |
| 226 * @param {function(Array<Array<number>>):void} handler Callback for desktop | |
| 227 * shape change notifications. | |
| 228 */ | |
| 229 remoting.ClientPlugin.prototype.setDesktopShapeUpdateHandler = | |
| 230 function(handler) {}; | |
| 231 | |
| 232 /** | |
| 233 * @param {function(!Array<string>):void} handler Callback to inform of | 210 * @param {function(!Array<string>):void} handler Callback to inform of |
| 234 * capabilities negotiated between host and client. | 211 * capabilities negotiated between host and client. |
| 235 */ | 212 */ |
| 236 remoting.ClientPlugin.prototype.setCapabilitiesHandler = | 213 remoting.ClientPlugin.prototype.setCapabilitiesHandler = |
| 237 function(handler) {}; | 214 function(handler) {}; |
| 238 | 215 |
| 239 /** | 216 /** |
| 240 * @param {function(string):void} handler Callback for processing security key | 217 * @param {function(string):void} handler Callback for processing security key |
| 241 * (Gnubby) protocol messages. | 218 * (Gnubby) protocol messages. |
| 242 */ | 219 */ |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 /** | 295 /** |
| 319 * Preload the plugin to make instantiation faster when the user tries | 296 * Preload the plugin to make instantiation faster when the user tries |
| 320 * to connect. | 297 * to connect. |
| 321 */ | 298 */ |
| 322 remoting.ClientPluginFactory.prototype.preloadPlugin = function() {}; | 299 remoting.ClientPluginFactory.prototype.preloadPlugin = function() {}; |
| 323 | 300 |
| 324 /** | 301 /** |
| 325 * @type {remoting.ClientPluginFactory} | 302 * @type {remoting.ClientPluginFactory} |
| 326 */ | 303 */ |
| 327 remoting.ClientPlugin.factory = null; | 304 remoting.ClientPlugin.factory = null; |
| OLD | NEW |