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

Unified Diff: remoting/host/client_session.cc

Issue 13983010: Use webrtc::DesktopCapturer for screen capturer implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: q Created 7 years, 8 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/client_session.cc
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index 24cad356852183deea19934d2a9afb99f86af3fa..209e65d84621af8ef161a08ffa4a9c3f91a845b8 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -99,8 +99,10 @@ void ClientSession::NotifyClientResolution(
const protocol::ClientResolution& resolution) {
DCHECK(CalledOnValidThread());
- if (!resolution.has_dips_width() || !resolution.has_dips_height())
+ if (!resolution.has_dips_width() || !resolution.has_dips_height() ||
+ resolution.dips_width() < 0 || resolution.dips_height() < 0) {
return;
+ }
VLOG(1) << "Received ClientResolution (dips_width="
<< resolution.dips_width() << ", dips_height="
@@ -109,13 +111,13 @@ void ClientSession::NotifyClientResolution(
if (!screen_controls_)
return;
+
ScreenResolution client_resolution(
- SkISize::Make(resolution.dips_width(), resolution.dips_height()),
- SkIPoint::Make(kDefaultDPI, kDefaultDPI));
+ webrtc::DesktopSize(resolution.dips_width(), resolution.dips_height()),
+ webrtc::DesktopVector(kDefaultDPI, kDefaultDPI));
// Try to match the client's resolution.
- if (client_resolution.IsValid())
alexeypa (please no reviews) 2013/04/26 21:33:58 IsValid() was more restrictive than the checks in
Sergey Ulanov 2013/05/07 22:25:50 Added checks for screen dimentions. It's actually
- screen_controls_->SetScreenResolution(client_resolution);
+ screen_controls_->SetScreenResolution(client_resolution);
}
void ClientSession::ControlVideo(const protocol::VideoControl& video_control) {

Powered by Google App Engine
This is Rietveld 408576698