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

Unified Diff: ash/wm/base_layout_manager.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/tooltips/tooltip_controller.cc ('k') | ash/wm/base_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/base_layout_manager.cc
diff --git a/ash/wm/base_layout_manager.cc b/ash/wm/base_layout_manager.cc
index 4b9a90644938797d223a2846037ea3890d9c0d63..6437a0721326fff7dc18d00d42c8a78d6f6a3707 100644
--- a/ash/wm/base_layout_manager.cc
+++ b/ash/wm/base_layout_manager.cc
@@ -111,7 +111,7 @@ void BaseLayoutManager::SetChildBounds(aura::Window* child,
if (wm::IsWindowMaximized(child))
child_bounds = ScreenAsh::GetMaximizedWindowBounds(child);
else if (wm::IsWindowFullscreen(child))
- child_bounds = gfx::Screen::GetMonitorAreaNearestWindow(child);
+ child_bounds = gfx::Screen::GetMonitorNearestWindow(child).bounds();
SetChildBoundsDirect(child, child_bounds);
}
@@ -194,8 +194,8 @@ void BaseLayoutManager::UpdateBoundsFromShowState(aura::Window* window) {
case ui::SHOW_STATE_FULLSCREEN:
SetRestoreBoundsIfNotSet(window);
- SetChildBoundsDirect(window,
- gfx::Screen::GetMonitorAreaNearestWindow(window));
+ SetChildBoundsDirect(
+ window, gfx::Screen::GetMonitorNearestWindow(window).bounds());
break;
default:
@@ -216,12 +216,12 @@ void BaseLayoutManager::AdjustWindowSizesForScreenChange() {
if (wm::IsWindowMaximized(window)) {
SetChildBoundsDirect(window, ScreenAsh::GetMaximizedWindowBounds(window));
} else if (wm::IsWindowFullscreen(window)) {
- SetChildBoundsDirect(window,
- gfx::Screen::GetMonitorAreaNearestWindow(window));
+ SetChildBoundsDirect(
+ window, gfx::Screen::GetMonitorNearestWindow(window).bounds());
} else {
// The work area may be smaller than the full screen.
gfx::Rect monitor_rect =
- gfx::Screen::GetMonitorWorkAreaNearestWindow(window);
+ gfx::Screen::GetMonitorNearestWindow(window).work_area();
// Put as much of the window as possible within the monitor area.
window->SetBounds(window->bounds().AdjustToFit(monitor_rect));
}
« no previous file with comments | « ash/tooltips/tooltip_controller.cc ('k') | ash/wm/base_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698