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

Unified Diff: ash/wm/window_resizer.cc

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 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
« no previous file with comments | « ash/wm/window_animations.cc ('k') | ash/wm/workspace/maximized_workspace.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 e48ee5270f9877817387cfc63731884d62d8b3fd..94d1891d48518cf54911cc4a92a68ac0209a5fea 100644
--- a/ash/wm/window_resizer.cc
+++ b/ash/wm/window_resizer.cc
@@ -203,8 +203,8 @@ gfx::Rect WindowResizer::CalculateBoundsForDrag(
if (details.window_component == HTBOTTOM ||
details.window_component == HTBOTTOMRIGHT ||
details.window_component == HTBOTTOMLEFT) {
- gfx::Rect work_area = gfx::Screen::GetMonitorWorkAreaNearestWindow(
- details.window);
+ gfx::Rect work_area = gfx::Screen::GetMonitorNearestWindow(
+ details.window).work_area();
if (new_bounds.bottom() > work_area.bottom())
new_bounds.Inset(0, 0, 0,
new_bounds.bottom() - work_area.bottom());
@@ -295,7 +295,7 @@ int WindowResizer::GetWidthForDrag(const Details& details,
// And don't let the window go bigger than the monitor.
int max_width =
- gfx::Screen::GetMonitorAreaNearestWindow(details.window).width();
+ gfx::Screen::GetMonitorNearestWindow(details.window).bounds().width();
if (width > max_width) {
width = max_width;
*delta_x = -x_multiplier * (details.initial_bounds.width() - max_width);
@@ -329,7 +329,7 @@ int WindowResizer::GetHeightForDrag(const Details& details,
// And don't let the window go bigger than the monitor.
int max_height =
- gfx::Screen::GetMonitorAreaNearestWindow(details.window).height();
+ gfx::Screen::GetMonitorNearestWindow(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_animations.cc ('k') | ash/wm/workspace/maximized_workspace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698