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

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: Fixed ResizingHostObserver unit-tests. 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
Index: remoting/host/desktop_session_proxy.cc
diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc
index 1f2bbc5d1720e2728ffa34e3d5103a437da1b19b..730dca7b4c16a28ca855d9819d7bf041d700d1e2 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<media::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') | remoting/host/resizing_host_observer_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698