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

Unified Diff: ash/screen_ash.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: new android code 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/screen_ash.cc
diff --git a/ash/screen_ash.cc b/ash/screen_ash.cc
index efda02240d0849c533e6c4044d836a50d6bbb515..9cb40d94cd32caeb2f23a906da71db6e082925e8 100644
--- a/ash/screen_ash.cc
+++ b/ash/screen_ash.cc
@@ -58,14 +58,14 @@ gfx::Rect ScreenAsh::GetUnmaximizedWorkAreaBoundsInParent(
gfx::Rect ScreenAsh::GetDisplayBoundsInParent(aura::Window* window) {
return ConvertRectFromScreen(
window->parent(),
- gfx::Screen::GetDisplayNearestWindow(window).bounds());
+ Shell::GetAshScreen()->GetDisplayNearestWindow(window).bounds());
}
// static
gfx::Rect ScreenAsh::GetDisplayWorkAreaBoundsInParent(aura::Window* window) {
return ConvertRectFromScreen(
window->parent(),
- gfx::Screen::GetDisplayNearestWindow(window).work_area());
+ Shell::GetAshScreen()->GetDisplayNearestWindow(window).work_area());
}
// static
@@ -91,12 +91,16 @@ const gfx::Display& ScreenAsh::GetSecondaryDisplay() {
return *(Shell::GetInstance()->display_controller()->GetSecondaryDisplay());
}
+bool ScreenAsh::IsDIPEnabled() {
+ return true;
+}
+
gfx::Point ScreenAsh::GetCursorScreenPoint() {
return aura::Env::GetInstance()->last_mouse_location();
}
gfx::NativeWindow ScreenAsh::GetWindowAtCursorScreenPoint() {
- const gfx::Point point = gfx::Screen::GetCursorScreenPoint();
+ const gfx::Point point = Shell::GetAshScreen()->GetCursorScreenPoint();
return wm::GetRootWindowAt(point)->GetTopWindowContainingPoint(point);
}
« no previous file with comments | « ash/screen_ash.h ('k') | ash/screensaver/screensaver_view.cc » ('j') | ash/shell.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698