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

Unified Diff: remoting/host/desktop_session_proxy.cc

Issue 15927033: Add host-side rate-limiting to desktop resize events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 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 | « no previous file | remoting/host/me2me_desktop_environment.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_session_proxy.cc
diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc
index c32c2bb3462ba68c4e1e9c26f626f9d9332e88cc..0760317f4c7b139f5ce0d3f5bf6a2dee78c38334 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) {
« no previous file with comments | « no previous file | remoting/host/me2me_desktop_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698