Index: ash/display/screen_position_controller.cc |
diff --git a/ash/display/screen_position_controller.cc b/ash/display/screen_position_controller.cc |
index 9503fd448c02605415238f18d372f80dc709c3b0..2c146a8aa294a1ed18d8ab7c4e29f276bdf02ef5 100644 |
--- a/ash/display/screen_position_controller.cc |
+++ b/ash/display/screen_position_controller.cc |
@@ -123,8 +123,11 @@ void ScreenPositionController::ConvertPointToScreen( |
gfx::Point* point) { |
const aura::Window* root = window->GetRootWindow(); |
aura::Window::ConvertPointToTarget(window, root, point); |
- const gfx::Point display_origin = Shell::GetScreen()->GetDisplayNearestWindow( |
- const_cast<aura::Window*>(root)).bounds().origin(); |
+ const gfx::Point display_origin = |
+ gfx::Screen::GetScreen() |
+ ->GetDisplayNearestWindow(const_cast<aura::Window*>(root)) |
+ .bounds() |
+ .origin(); |
point->Offset(display_origin.x(), display_origin.y()); |
} |
@@ -132,8 +135,11 @@ void ScreenPositionController::ConvertPointFromScreen( |
const aura::Window* window, |
gfx::Point* point) { |
const aura::Window* root = window->GetRootWindow(); |
- const gfx::Point display_origin = Shell::GetScreen()->GetDisplayNearestWindow( |
- const_cast<aura::Window*>(root)).bounds().origin(); |
+ const gfx::Point display_origin = |
+ gfx::Screen::GetScreen() |
+ ->GetDisplayNearestWindow(const_cast<aura::Window*>(root)) |
+ .bounds() |
+ .origin(); |
point->Offset(-display_origin.x(), -display_origin.y()); |
aura::Window::ConvertPointToTarget(root, window, point); |
} |
@@ -222,8 +228,10 @@ void ScreenPositionController::SetBounds(aura::Window* window, |
} |
} |
gfx::Point origin(bounds.origin()); |
- const gfx::Point display_origin = Shell::GetScreen()->GetDisplayNearestWindow( |
- window).bounds().origin(); |
+ const gfx::Point display_origin = gfx::Screen::GetScreen() |
+ ->GetDisplayNearestWindow(window) |
+ .bounds() |
+ .origin(); |
origin.Offset(-display_origin.x(), -display_origin.y()); |
window->SetBounds(gfx::Rect(origin, bounds.size())); |
} |