Chromium Code Reviews| 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) { |