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

Unified Diff: ash/display/screen_position_controller.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some new gfx::Screen additions Created 8 years, 2 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
Index: ash/display/screen_position_controller.cc
diff --git a/ash/display/screen_position_controller.cc b/ash/display/screen_position_controller.cc
index 3f2c39200cbf24c4a70f67a7536f268b23e38c54..b87a62ae04ee656d938e7ca20eabc7e8285fae71 100644
--- a/ash/display/screen_position_controller.cc
+++ b/ash/display/screen_position_controller.cc
@@ -62,7 +62,7 @@ void ScreenPositionController::ConvertPointToScreen(
const aura::RootWindow* root = window->GetRootWindow();
aura::Window::ConvertPointToTarget(window, root, point);
const gfx::Point display_origin =
- gfx::Screen::GetDisplayNearestWindow(
+ Shell::GetAshScreen()->GetDisplayNearestWindow(
const_cast<aura::RootWindow*>(root)).bounds().origin();
point->Offset(display_origin.x(), display_origin.y());
}
@@ -72,7 +72,7 @@ void ScreenPositionController::ConvertPointFromScreen(
gfx::Point* point) {
const aura::RootWindow* root = window->GetRootWindow();
const gfx::Point display_origin =
- gfx::Screen::GetDisplayNearestWindow(
+ Shell::GetAshScreen()->GetDisplayNearestWindow(
const_cast<aura::RootWindow*>(root)).bounds().origin();
point->Offset(-display_origin.x(), -display_origin.y());
aura::Window::ConvertPointToTarget(root, window, point);
@@ -150,8 +150,8 @@ void ScreenPositionController::SetBounds(aura::Window* window,
}
gfx::Point origin(bounds.origin());
- const gfx::Point display_origin =
- gfx::Screen::GetDisplayNearestWindow(window).bounds().origin();
+ const gfx::Point display_origin = Shell::GetAshScreen()->
+ GetDisplayNearestWindow(window).bounds().origin();
origin.Offset(-display_origin.x(), -display_origin.y());
window->SetBounds(gfx::Rect(origin, bounds.size()));
}

Powered by Google App Engine
This is Rietveld 408576698