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

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: Reviewer feedback. 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
« no previous file with comments | « remoting/webapp/client_plugin.js ('k') | remoting/webapp/client_session.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..dd1b5cd7d89b171f8b152eb22c331e58584f68f7 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.desktopXDpi = 96;
+ this.desktopYDpi = 96;
/** @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.desktopXDpi = (typeof message.data['x_dpi'] == 'number') ?
+ /** @type {number} */ (message.data['x_dpi']) : 96;
+ this.desktopYDpi = (typeof message.data['y_dpi'] == 'number') ?
+ /** @type {number} */ (message.data['y_dpi']) : 96;
this.onDesktopSizeUpdateHandler();
} else if (message.method == 'onPerfStats') {
if (typeof message.data['videoBandwidth'] != 'number' ||
« no previous file with comments | « remoting/webapp/client_plugin.js ('k') | remoting/webapp/client_session.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698