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

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

Issue 927373005: [Chromoting] Enable jscompile for browser tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittests; More review comments 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
« no previous file with comments | « remoting/webapp/crd/js/crd_connect.js ('k') | remoting/webapp/crd/js/session_connector.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/desktop_connected_view.js
diff --git a/remoting/webapp/crd/js/desktop_connected_view.js b/remoting/webapp/crd/js/desktop_connected_view.js
index 140607eebf2fd4c44e703e90707f772e52e4ad94..73eebd2615e6121de20f9ed35b0946cb7443bb60 100644
--- a/remoting/webapp/crd/js/desktop_connected_view.js
+++ b/remoting/webapp/crd/js/desktop_connected_view.js
@@ -108,9 +108,9 @@ remoting.DesktopConnectedView = function(session, container, hostDisplayName,
// and height of the client plugin so that bump-scrolling can be tested
// without relying on the actual size of the host desktop.
/** @type {number} @private */
- this.pluginWidthForBumpScrollTesting = 0;
+ this.pluginWidthForBumpScrollTesting_ = 0;
/** @type {number} @private */
- this.pluginHeightForBumpScrollTesting = 0;
+ this.pluginHeightForBumpScrollTesting_ = 0;
/** @type {remoting.VideoFrameRecorder} @private */
this.videoFrameRecorder_ = null;
@@ -188,6 +188,16 @@ remoting.DesktopConnectedView.prototype.getClientArea_ = function() {
};
/**
+ * @param {number} width
+ * @param {number} height
+ */
+remoting.DesktopConnectedView.prototype.setPluginSizeForBumpScrollTesting =
+ function(width, height) {
+ this.pluginWidthForBumpScrollTesting_ = width;
+ this.pluginHeightForBumpScrollTesting_ = height;
+}
+
+/**
* Notifies the host of the client's current dimensions and DPI.
* Also takes into account per-host scaling factor, if configured.
* TODO: private
@@ -718,12 +728,12 @@ remoting.DesktopConnectedView.prototype.scroll_ = function(dx, dy) {
var stopX = { stop: false };
var clientArea = this.getClientArea_();
style.marginLeft = adjustMargin(style.marginLeft, dx, clientArea.width,
- this.pluginWidthForBumpScrollTesting || plugin.clientWidth, stopX);
+ this.pluginWidthForBumpScrollTesting_ || plugin.clientWidth, stopX);
var stopY = { stop: false };
style.marginTop = adjustMargin(
style.marginTop, dy, clientArea.height,
- this.pluginHeightForBumpScrollTesting || plugin.clientHeight, stopY);
+ this.pluginHeightForBumpScrollTesting_ || plugin.clientHeight, stopY);
return stopX.stop && stopY.stop;
};
« no previous file with comments | « remoting/webapp/crd/js/crd_connect.js ('k') | remoting/webapp/crd/js/session_connector.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698