Index: remoting/webapp/client_session.js |
diff --git a/remoting/webapp/client_session.js b/remoting/webapp/client_session.js |
index b81260dc8c1fb21467d3f17579c9b77464d218b7..7a87a52e691a558ad610cbac68e9fd1bea7f2736 100644 |
--- a/remoting/webapp/client_session.js |
+++ b/remoting/webapp/client_session.js |
@@ -254,7 +254,8 @@ remoting.ClientSession.Capability = { |
// When enabled this capability causes the client to send its screen |
// resolution to the host once connection has been established. See |
// this.plugin.notifyClientResolution(). |
- SEND_INITIAL_RESOLUTION: 'sendInitialResolution' |
+ SEND_INITIAL_RESOLUTION: 'sendInitialResolution', |
+ RATE_LIMIT_RESIZE_REQUESTS: 'rateLimitResizeRequests' |
}; |
/** |
@@ -890,12 +891,17 @@ remoting.ClientSession.prototype.onResize = function() { |
// Defer notifying the host of the change until the window stops resizing, to |
// avoid overloading the control channel with notifications. |
if (this.resizeToClient_) { |
+ var kResizeRateLimitMs = 1000; |
+ if (this.hasCapability_( |
+ remoting.ClientSession.Capability.RATE_LIMIT_RESIZE_REQUESTS)) { |
+ kResizeRateLimitMs = 250; |
+ } |
this.notifyClientResolutionTimer_ = window.setTimeout( |
this.plugin.notifyClientResolution.bind(this.plugin, |
window.innerWidth, |
window.innerHeight, |
window.devicePixelRatio), |
- 1000); |
+ kResizeRateLimitMs); |
} |
// If bump-scrolling is enabled, adjust the plugin margins to fully utilize |