Commit 228eb5fb authored by Jamie Walch's avatar Jamie Walch Committed by Commit Bot

Fix resize on Windows

Among other things, https://chromiumcodereview.appspot.com/13983010
removed ScreenResolution::IsValid(), but missed a required negation
when replacing one caller with IsEmpty(). Since that CL, we have added
support for using an empty ScreenResolution to restore the previous
desktop size (although it is currently disabled client-side), so the
check is no longer required and this CL removes it. It also fixes an
out-of-date comment referring to the same API.

Change-Id: I12cc223c2b8f9579e50dbcd3dab0c0e0476416eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2293420
Commit-Queue: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Joe Downing <joedow@chromium.org>
Auto-Submit: Jamie Walch <jamiewalch@chromium.org>
Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#787439}
parent 9ca5cae7
......@@ -709,7 +709,7 @@ void DesktopSessionAgent::SetScreenResolution(
const ScreenResolution& resolution) {
DCHECK(caller_task_runner_->BelongsToCurrentThread());
if (screen_controls_ && resolution.IsEmpty())
if (screen_controls_)
screen_controls_->SetScreenResolution(resolution);
}
......
......@@ -27,8 +27,7 @@ class ScreenResolution {
// The vertical and horizontal DPI of the screen.
const webrtc::DesktopVector& dpi() const { return dpi_; }
// Returns true if |dimensions_| specifies an empty rectangle or when
// IsValid() returns false.
// Returns true if |dimensions_| specifies an empty rectangle.
bool IsEmpty() const;
// Returns true if the dimensions and DPI of the two resolutions match.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment