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

Side by Side Diff: remoting/webapp/crd/js/client_plugin.js

Issue 929323003: Separate host desktop related functionality into remoting.HostDesktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's feedback Created 5 years, 10 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
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 * @param {number} to 66 * @param {number} to
82 */ 67 */
83 remoting.ClientPlugin.prototype.remapKey = function(from, to) {}; 68 remoting.ClientPlugin.prototype.remapKey = function(from, to) {};
84 69
85 /** 70 /**
86 * Release all keys currently being pressed. 71 * Release all keys currently being pressed.
87 */ 72 */
88 remoting.ClientPlugin.prototype.releaseAllKeys = function() {}; 73 remoting.ClientPlugin.prototype.releaseAllKeys = function() {};
89 74
90 /** 75 /**
91 * @param {number} width
92 * @param {number} height
93 * @param {number} dpi
94 */
95 remoting.ClientPlugin.prototype.notifyClientResolution =
96 function(width, height, dpi) {};
97
98 /**
99 * @param {string} iq 76 * @param {string} iq
100 */ 77 */
101 remoting.ClientPlugin.prototype.onIncomingIq = function(iq) {}; 78 remoting.ClientPlugin.prototype.onIncomingIq = function(iq) {};
102 79
103 /** 80 /**
104 * @return {boolean} True if the web-app and plugin are compatible. 81 * @return {boolean} True if the web-app and plugin are compatible.
105 */ 82 */
106 remoting.ClientPlugin.prototype.isSupportedVersion = function() {}; 83 remoting.ClientPlugin.prototype.isSupportedVersion = function() {};
107 84
108 /** 85 /**
109 * @param {remoting.ClientPlugin.Feature} feature 86 * @param {remoting.ClientPlugin.Feature} feature
110 * @return {boolean} True if the plugin support the specified feature. 87 * @return {boolean} True if the plugin support the specified feature.
Jamie 2015/02/18 23:06:19 We need to be very careful about the definitions o
kelvinp 2015/02/19 20:58:15 Acknowledged.
Jamie 2015/02/19 22:44:04 Actually, I was suggesting that you document it in
111 */ 88 */
112 remoting.ClientPlugin.prototype.hasFeature = function(feature) {}; 89 remoting.ClientPlugin.prototype.hasFeature = function(feature) {};
113 90
114 /** 91 /**
92 * @param {string} capability
93 * @return {boolean} True if the host support the specified capability.
94 */
95 remoting.ClientPlugin.prototype.hasCapability = function(capability) {};
96
97 /**
115 * Sends a clipboard item to the host. 98 * Sends a clipboard item to the host.
116 * 99 *
117 * @param {string} mimeType The MIME type of the clipboard item. 100 * @param {string} mimeType The MIME type of the clipboard item.
118 * @param {string} item The clipboard item. 101 * @param {string} item The clipboard item.
119 */ 102 */
120 remoting.ClientPlugin.prototype.sendClipboardItem = 103 remoting.ClientPlugin.prototype.sendClipboardItem =
121 function(mimeType, item) {}; 104 function(mimeType, item) {};
122 105
123 /** 106 /**
124 * Tell the plugin to request a PIN asynchronously. 107 * Tell the plugin to request a PIN asynchronously.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 remoting.ClientPlugin.prototype.setRouteChangedHandler = function(handler) {}; 192 remoting.ClientPlugin.prototype.setRouteChangedHandler = function(handler) {};
210 193
211 /** 194 /**
212 * @param {function(boolean):void} handler Callback for connection readiness 195 * @param {function(boolean):void} handler Callback for connection readiness
213 * notifications. 196 * notifications.
214 */ 197 */
215 remoting.ClientPlugin.prototype.setConnectionReadyHandler = 198 remoting.ClientPlugin.prototype.setConnectionReadyHandler =
216 function(handler) {}; 199 function(handler) {};
217 200
218 /** 201 /**
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 202 * @param {function(!Array<string>):void} handler Callback to inform of
234 * capabilities negotiated between host and client. 203 * capabilities negotiated between host and client.
235 */ 204 */
236 remoting.ClientPlugin.prototype.setCapabilitiesHandler = 205 remoting.ClientPlugin.prototype.setCapabilitiesHandler =
237 function(handler) {}; 206 function(handler) {};
238 207
239 /** 208 /**
240 * @param {function(string):void} handler Callback for processing security key 209 * @param {function(string):void} handler Callback for processing security key
241 * (Gnubby) protocol messages. 210 * (Gnubby) protocol messages.
242 */ 211 */
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 /** 287 /**
319 * Preload the plugin to make instantiation faster when the user tries 288 * Preload the plugin to make instantiation faster when the user tries
320 * to connect. 289 * to connect.
321 */ 290 */
322 remoting.ClientPluginFactory.prototype.preloadPlugin = function() {}; 291 remoting.ClientPluginFactory.prototype.preloadPlugin = function() {};
323 292
324 /** 293 /**
325 * @type {remoting.ClientPluginFactory} 294 * @type {remoting.ClientPluginFactory}
326 */ 295 */
327 remoting.ClientPlugin.factory = null; 296 remoting.ClientPlugin.factory = null;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698