Chromium Code Reviews| Index: remoting/webapp/crd/js/host_desktop.js |
| diff --git a/remoting/webapp/crd/js/host_desktop.js b/remoting/webapp/crd/js/host_desktop.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..989d7086939b8fc2931d17ad6c9c057f373690a6 |
| --- /dev/null |
| +++ b/remoting/webapp/crd/js/host_desktop.js |
| @@ -0,0 +1,53 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +/** |
| + * @fileoverview |
| + * Interface abstracting the functionality of the HostDesktop. |
| + */ |
| + |
| +var remoting = remoting || {}; |
| + |
| +(function() { |
| + |
| +'use strict'; |
| + |
| +/** |
| + * @interface |
| + * @extends {base.EventSource} |
| + */ |
| +remoting.HostDesktop = function() {}; |
| + |
| +/** @return {boolean} Whether the host rate limits desktop-resize requests. */ |
| +remoting.HostDesktop.prototype.hasResizeRateLimit = function() {}; |
|
Jamie
2015/02/18 23:06:19
I don't think you need this. It was important to a
kelvinp
2015/02/19 20:58:15
Done.
|
| + |
| +/** @return {boolean} Whether the host supports desktop resizing. */ |
| +remoting.HostDesktop.prototype.isResizable = function() {}; |
|
Jamie
2015/02/18 23:06:19
I'm not sure you need this either. Some Linux host
kelvinp
2015/02/19 20:58:15
Yes, I think it would be nice if we can expose tha
|
| + |
| +/** @enum {string} */ |
| +remoting.HostDesktop.Events = { |
| + // Fired when the size of the host desktop changes with no event data. |
| + sizeChanged: 'sizeChanged', |
| + // Fired when the shape of the host desktop changes with an array of |
| + // rectangles of desktop shapes as the event data. |
| + // Array<{left:number, top:number, width:number, height:number}> |
| + shapeChanged: 'shapeChanged' |
| +}; |
| + |
| +/** |
| + * @return {{width:number, height:number, xDpi:number, yDpi:number}} |
| + * The dimensions and DPI settings of the host desktop. |
| + */ |
| +remoting.HostDesktop.prototype.getDimensions = function() {}; |
| + |
| +/** |
| + * Resize the desktop of the host to |width|, |height| and |dpi|. |
| + * |
| + * @param {number} width |
|
Jamie
2015/02/18 23:06:19
I think |width| and |height| are in DIPs, correct?
kelvinp
2015/02/19 20:58:15
Yes. Comments updated.
|
| + * @param {number} height |
| + * @param {number} dpi |
| + */ |
| +remoting.HostDesktop.prototype.resize = function(width, height, dpi) {}; |
| + |
| +})(); |