Index: remoting/webapp/client_session.js |
diff --git a/remoting/webapp/client_session.js b/remoting/webapp/client_session.js |
index f40fa850addd071aff82e537e50b808fc90817c3..7f8315239ae994dbd5e02e69938ce1d051e467cc 100644 |
--- a/remoting/webapp/client_session.js |
+++ b/remoting/webapp/client_session.js |
@@ -244,7 +244,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' |
}; |
/** |
@@ -880,12 +881,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 |