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

Unified Diff: ash/wm/window_resizer.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some new gfx::Screen additions Created 8 years, 2 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: ash/wm/window_resizer.cc
diff --git a/ash/wm/window_resizer.cc b/ash/wm/window_resizer.cc
index c759c9162ab84bda43fb1a4c3f6afacfd7e38ac7..900dedbebd8e3dd1f033f10b0c83c75e7bbbeb0b 100644
--- a/ash/wm/window_resizer.cc
+++ b/ash/wm/window_resizer.cc
@@ -271,8 +271,8 @@ int WindowResizer::GetWidthForDrag(const Details& details,
}
// And don't let the window go bigger than the display.
- int max_width =
- gfx::Screen::GetDisplayNearestWindow(details.window).bounds().width();
+ int max_width = Shell::GetAshScreen()->GetDisplayNearestWindow(
+ details.window).bounds().width();
if (width > max_width) {
width = max_width;
*delta_x = -x_multiplier * (details.initial_bounds.width() - max_width);
@@ -299,8 +299,8 @@ int WindowResizer::GetHeightForDrag(const Details& details,
}
// And don't let the window go bigger than the display.
- int max_height =
- gfx::Screen::GetDisplayNearestWindow(details.window).bounds().height();
+ int max_height = Shell::GetAshScreen()->GetDisplayNearestWindow(
+ details.window).bounds().height();
if (height > max_height) {
height = max_height;
*delta_y = -y_multiplier * (details.initial_bounds.height() - max_height);

Powered by Google App Engine
This is Rietveld 408576698