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

Unified Diff: ash/wm/window_resizer.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_positioner_unittest.cc ('k') | ash/wm/window_state_unittest.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 245d85ef061d8a8919db431ef387a2d4434a30f6..f6ea1c0764c7c6b1ab797aef390a53d29844635b 100644
--- a/ash/wm/window_resizer.cc
+++ b/ash/wm/window_resizer.cc
@@ -137,8 +137,9 @@ gfx::Rect WindowResizer::CalculateBoundsForDrag(
// has to come first since it might have an impact on the origin as well as
// on the size.
if (details().bounds_change & kBoundsChange_Resizes) {
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(GetTarget()).work_area();
+ gfx::Rect work_area = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(GetTarget())
+ .work_area();
aura::Window* dock_container = Shell::GetContainer(
GetTarget()->GetRootWindow(), kShellWindowId_DockedContainer);
DockedWindowLayoutManager* dock_layout =
@@ -207,7 +208,7 @@ gfx::Rect WindowResizer::CalculateBoundsForDrag(
// Use a pointer location (matching the logic in DragWindowResizer) to
// calculate the target display after the drag.
const gfx::Display& display =
- Shell::GetScreen()->GetDisplayMatching(near_passed_location);
+ gfx::Screen::GetScreen()->GetDisplayMatching(near_passed_location);
aura::Window* dock_container =
Shell::GetContainer(wm::GetRootWindowMatching(near_passed_location),
kShellWindowId_DockedContainer);
@@ -308,8 +309,10 @@ int WindowResizer::GetWidthForDrag(int min_width, int* delta_x) {
}
// And don't let the window go bigger than the display.
- int max_width = Shell::GetScreen()->GetDisplayNearestWindow(
- GetTarget()).bounds().width();
+ int max_width = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(GetTarget())
+ .bounds()
+ .width();
gfx::Size max_size = GetTarget()->delegate()->GetMaximumSize();
if (max_size.width() != 0)
max_width = std::min(max_width, max_size.width());
@@ -338,8 +341,10 @@ int WindowResizer::GetHeightForDrag(int min_height, int* delta_y) {
}
// And don't let the window go bigger than the display.
- int max_height = Shell::GetScreen()->GetDisplayNearestWindow(
- GetTarget()).bounds().height();
+ int max_height = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(GetTarget())
+ .bounds()
+ .height();
gfx::Size max_size = GetTarget()->delegate()->GetMaximumSize();
if (max_size.height() != 0)
max_height = std::min(max_height, max_size.height());
« no previous file with comments | « ash/wm/window_positioner_unittest.cc ('k') | ash/wm/window_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698