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

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 new addition 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
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | ash/wm/window_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_resizer.cc
diff --git a/ash/wm/window_resizer.cc b/ash/wm/window_resizer.cc
index c759c9162ab84bda43fb1a4c3f6afacfd7e38ac7..6ea755233fcc62be71fe72712aa001e856f8f17f 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::GetScreen()->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::GetScreen()->GetDisplayNearestWindow(
+ details.window).bounds().height();
if (height > max_height) {
height = max_height;
*delta_y = -y_multiplier * (details.initial_bounds.height() - max_height);
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | ash/wm/window_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698