diff options
author | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-09 01:43:14 +0000 |
---|---|---|
committer | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-09 01:43:14 +0000 |
commit | 4a444c42bafdc2cbdca1e1e6cb28b18c9fa92f82 (patch) | |
tree | 431740041c5fa661a85c876727c2befd03d0e1cf /remoting/host/desktop_session_proxy.cc | |
parent | 8731c62812c4b2eda8fcd4847218098e24a9418d (diff) | |
download | chromium_src-4a444c42bafdc2cbdca1e1e6cb28b18c9fa92f82.zip chromium_src-4a444c42bafdc2cbdca1e1e6cb28b18c9fa92f82.tar.gz chromium_src-4a444c42bafdc2cbdca1e1e6cb28b18c9fa92f82.tar.bz2 |
Add host-side rate-limiting to desktop resize events.
Also, make the client-side rate-limiting more granular. This means that the
desktop resizes sooner after the user stops resizing the window.
BUG=187272
Review URL: https://chromiumcodereview.appspot.com/15927033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/desktop_session_proxy.cc')
-rw-r--r-- | remoting/host/desktop_session_proxy.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc index c32c2bb..0760317 100644 --- a/remoting/host/desktop_session_proxy.cc +++ b/remoting/host/desktop_session_proxy.cc @@ -34,6 +34,7 @@ const bool kReadOnly = true; const char kSendInitialResolution[] = "sendInitialResolution"; +const char kRateLimitResizeRequests[] = "rateLimitResizeRequests"; namespace remoting { @@ -144,8 +145,11 @@ scoped_ptr<webrtc::ScreenCapturer> DesktopSessionProxy::CreateVideoCapturer() { } std::string DesktopSessionProxy::GetCapabilities() const { - // Ask the client to send it's resolution unconditionally. - return virtual_terminal_ ? kSendInitialResolution : std::string(); + std::string result = kRateLimitResizeRequests; + // Ask the client to send its resolution unconditionally. + if (virtual_terminal_) + result = result + " " + kSendInitialResolution; + return result; } void DesktopSessionProxy::SetCapabilities(const std::string& capabilities) { |