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

Unified Diff: remoting/webapp/client_plugin_async.js

Issue 10801003: Propagate DPI information to web-app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed typo. Created 8 years, 5 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/client_plugin_async.js
diff --git a/remoting/webapp/client_plugin_async.js b/remoting/webapp/client_plugin_async.js
index e57902eb7a933e63d9ad831921151b9d8e6737c5..ed84beeb79f67a34132d9361c45c432b492ef67c 100644
--- a/remoting/webapp/client_plugin_async.js
+++ b/remoting/webapp/client_plugin_async.js
@@ -26,6 +26,8 @@ remoting.ClientPluginAsync = function(plugin) {
this.desktopWidth = 0;
this.desktopHeight = 0;
+ this.desktopDpiX = 0;
+ this.desktopDpiY = 0;
/** @param {string} iq The Iq stanza received from the host. */
this.onOutgoingIqHandler = function (iq) {};
@@ -162,6 +164,10 @@ remoting.ClientPluginAsync.prototype.handleMessage_ = function(messageStr) {
}
this.desktopWidth = /** @type {number} */ message.data['width'];
this.desktopHeight = /** @type {number} */ message.data['height'];
+ this.desktopDpiX = (typeof message.data['x_dpi'] == 'number') ?
+ /** @type {number} */ (message.data['x_dpi']) : 0;
Wez 2012/07/19 01:00:42 nit: Treat missing DPI as 96 DPI for consistency w
Jamie 2012/07/19 23:00:06 That was left-over debugging code. Fixed here and
+ this.desktopDpiY = (typeof message.data['y_dpi'] == 'number') ?
+ /** @type {number} */ (message.data['y_dpi']) : 0;
this.onDesktopSizeUpdateHandler();
} else if (message.method == 'onPerfStats') {
if (typeof message.data['videoBandwidth'] != 'number' ||

Powered by Google App Engine
This is Rietveld 408576698