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

Unified Diff: remoting/webapp/client_plugin_async.js

Issue 10265033: Send new client dimensions to host whenever they change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 8 years, 8 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_plugin_v1.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 211502c071e7657cb137e4caeded3c12621993a4..cb14fa498c024605a348cfa06b4e815b37ebb054 100644
--- a/remoting/webapp/client_plugin_async.js
+++ b/remoting/webapp/client_plugin_async.js
@@ -365,6 +365,21 @@ remoting.ClientPluginAsync.prototype.sendClipboardItem =
};
/**
+ * Notifies the host that the client has the specified dimensions.
+ *
+ * @param {number} width The available client width.
+ * @param {number} height The available client height.
+ */
+remoting.ClientPluginAsync.prototype.notifyClientDimensions =
+ function(width, height) {
+ if (!this.hasFeature(remoting.ClientPlugin.Feature.NOTIFY_CLIENT_DIMENSIONS))
+ return;
+ this.plugin.postMessage(JSON.stringify(
+ { method: 'notifyClientDimensions',
+ data: { width: width, height: height }}));
+};
+
+/**
* If we haven't yet received a "hello" message from the plugin, change its
* size so that the user can confirm it if click-to-play is enabled, or can
* see the "this plugin is disabled" message if it is actually disabled.
« no previous file with comments | « remoting/webapp/client_plugin.js ('k') | remoting/webapp/client_plugin_v1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698