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

Unified Diff: remoting/webapp/crd/js/host_desktop.js

Issue 929323003: Separate host desktop related functionality into remoting.HostDesktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Jamie'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 side-by-side diff with in-line comments
Download patch
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..d763554eac21c45cdc469a7859bc686040638a1b
--- /dev/null
+++ b/remoting/webapp/crd/js/host_desktop.js
@@ -0,0 +1,51 @@
+// 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 supports desktop resizing. */
+remoting.HostDesktop.prototype.isResizable = function() {};
+
+/** @enum {string} */
+remoting.HostDesktop.Events = {
+ // Fired when the size of the host desktop changes with the desktop dimensions
+ // {{width:number, height:number, xDpi:number, yDpi:number}}
+ 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 |deviceScale|.
+ *
+ * @param {number} width The width of the desktop in DIP.
Jamie 2015/02/19 22:44:04 s/DIP/DIPs/
kelvinp 2015/02/19 23:36:20 Done.
+ * @param {number} height The height of the desktop in DIP.
+ * @param {number} deviceScale
+ */
+remoting.HostDesktop.prototype.resize = function(width, height, deviceScale) {};
+
+})();

Powered by Google App Engine
This is Rietveld 408576698