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

Unified Diff: ash/wm/window_positioner.cc

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: cros Created 4 years, 11 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_positioner_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_positioner.cc
diff --git a/ash/wm/window_positioner.cc b/ash/wm/window_positioner.cc
index 4a1d02e386ce6745ea028adb3b8e1fc6e73b1ea3..4c9a38df7a025034a807ecafb5467e9a26a77425 100644
--- a/ash/wm/window_positioner.cc
+++ b/ash/wm/window_positioner.cc
@@ -81,8 +81,10 @@ gfx::Rect GetWorkAreaForWindowInParent(aura::Window* window) {
// use window's bounds instead.
// TODO(oshima): Emulate host window resize on win8.
gfx::Rect work_area = gfx::Rect(window->parent()->bounds().size());
- work_area.Inset(Shell::GetScreen()->GetDisplayMatching(
- window->parent()->GetBoundsInScreen()).GetWorkAreaInsets());
+ work_area.Inset(
+ gfx::Screen::GetScreen()
+ ->GetDisplayMatching(window->parent()->GetBoundsInScreen())
+ .GetWorkAreaInsets());
return work_area;
#else
return ScreenUtil::GetDisplayWorkAreaBoundsInParent(window);
@@ -457,9 +459,12 @@ gfx::Rect WindowPositioner::GetPopupPosition(const gfx::Rect& old_pos) {
// We handle the Multi monitor support by retrieving the active window's
// work area.
aura::Window* window = wm::GetActiveWindow();
- const gfx::Rect work_area = window && window->IsVisible() ?
- Shell::GetScreen()->GetDisplayNearestWindow(window).work_area() :
- Shell::GetScreen()->GetPrimaryDisplay().work_area();
+ const gfx::Rect work_area =
+ window && window->IsVisible()
+ ? gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(window)
+ .work_area()
+ : gfx::Screen::GetScreen()->GetPrimaryDisplay().work_area();
// Only try to reposition the popup when it is not spanning the entire
// screen.
if ((old_pos.width() + popup_position_offset_from_screen_corner_x >=
« no previous file with comments | « ash/wm/window_manager_unittest.cc ('k') | ash/wm/window_positioner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698