OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 functionality of the HostDesktop. | 7 * Interface abstracting the functionality of the HostDesktop. |
8 */ | 8 */ |
9 | 9 |
10 var remoting = remoting || {}; | 10 var remoting = remoting || {}; |
11 | 11 |
12 (function() { | 12 (function() { |
13 | 13 |
14 'use strict'; | 14 'use strict'; |
15 | 15 |
16 /** | 16 /** |
17 * @interface | 17 * @interface |
18 * @extends {base.EventSource} | 18 * @extends {base.EventSource} |
19 */ | 19 */ |
20 remoting.HostDesktop = function() {}; | 20 remoting.HostDesktop = function() {}; |
21 | 21 |
22 /** @enum {string} */ | 22 /** @enum {string} */ |
23 remoting.HostDesktop.Events = { | 23 remoting.HostDesktop.Events = { |
24 // Fired when the size of the host desktop changes with the desktop dimensions | 24 // Fired when the size of the host desktop changes with the desktop dimensions |
25 // {{width:number, height:number, xDpi:number, yDpi:number}} | 25 // {{width:number, height:number, xDpi:number, yDpi:number}} |
26 sizeChanged: 'sizeChanged', | 26 sizeChanged: 'sizeChanged', |
27 // Fired when the shape of the host desktop changes with an array of | |
28 // rectangles of desktop shapes as the event data. | |
29 // Array<{left:number, top:number, width:number, height:number}> | |
30 shapeChanged: 'shapeChanged' | |
31 }; | 27 }; |
32 | 28 |
33 /** | 29 /** |
34 * @return {{width:number, height:number, xDpi:number, yDpi:number}} | 30 * @return {{width:number, height:number, xDpi:number, yDpi:number}} |
35 * The dimensions and DPI settings of the host desktop. | 31 * The dimensions and DPI settings of the host desktop. |
36 */ | 32 */ |
37 remoting.HostDesktop.prototype.getDimensions = function() {}; | 33 remoting.HostDesktop.prototype.getDimensions = function() {}; |
38 | 34 |
39 /** | 35 /** |
40 * Resize the desktop of the host to |width|, |height| and |deviceScale|. | 36 * Resize the desktop of the host to |width|, |height| and |deviceScale|. |
41 * | 37 * |
42 * @param {number} width The width of the desktop in DIPs. | 38 * @param {number} width The width of the desktop in DIPs. |
43 * @param {number} height The height of the desktop in DIPs. | 39 * @param {number} height The height of the desktop in DIPs. |
44 * @param {number} deviceScale | 40 * @param {number} deviceScale |
45 */ | 41 */ |
46 remoting.HostDesktop.prototype.resize = function(width, height, deviceScale) {}; | 42 remoting.HostDesktop.prototype.resize = function(width, height, deviceScale) {}; |
47 | 43 |
48 })(); | 44 })(); |
OLD | NEW |