Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / remoting / webapp / base / js / host_desktop.js
blob83a4d765b5ab71f34ece62b7003bd5868022b5c1
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
3 // found in the LICENSE file.
5 /**
6 * @fileoverview
7 * Interface abstracting the functionality of the HostDesktop.
8 */
10 var remoting = remoting || {};
12 (function() {
14 'use strict';
16 /**
17 * @interface
18 * @extends {base.EventSource}
20 remoting.HostDesktop = function() {};
22 /** @enum {string} */
23 remoting.HostDesktop.Events = {
24 // Fired when the size of the host desktop changes with the desktop dimensions
25 // {{width:number, height:number, xDpi:number, yDpi:number}}
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'
33 /**
34 * @return {{width:number, height:number, xDpi:number, yDpi:number}}
35 * The dimensions and DPI settings of the host desktop.
37 remoting.HostDesktop.prototype.getDimensions = function() {};
39 /**
40 * Resize the desktop of the host to |width|, |height| and |deviceScale|.
42 * @param {number} width The width of the desktop in DIPs.
43 * @param {number} height The height of the desktop in DIPs.
44 * @param {number} deviceScale
46 remoting.HostDesktop.prototype.resize = function(width, height, deviceScale) {};
48 })();