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

Unified Diff: ui/gfx/screen_gtk.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 other os's 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: ui/gfx/screen_gtk.cc
diff --git a/ui/gfx/screen_gtk.cc b/ui/gfx/screen_gtk.cc
index 7b0b34c8cd06dc4a51c0f396e2653b97dbd6a854..55691f1b67ad7d4f9ebdf5b334165dda1b79788f 100644
--- a/ui/gfx/screen_gtk.cc
+++ b/ui/gfx/screen_gtk.cc
@@ -81,14 +81,15 @@ bool Screen::IsDIPEnabled() {
}
// static
-gfx::Point Screen::GetCursorScreenPoint() {
+gfx::Point Screen::GetCursorScreenPoint(gfx::NativeView context) {
gint x, y;
gdk_display_get_pointer(gdk_display_get_default(), NULL, &x, &y, NULL);
return gfx::Point(x, y);
}
// static
-gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() {
+gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint(
+ gfx::NativeView context) {
GdkWindow* window = gdk_window_at_pointer(NULL, NULL);
if (!window)
return NULL;
@@ -119,7 +120,8 @@ gfx::Display Screen::GetDisplayNearestWindow(gfx::NativeView view) {
}
// static
-gfx::Display Screen::GetDisplayNearestPoint(const gfx::Point& point) {
+gfx::Display Screen::GetDisplayNearestPoint(
+ gfx::NativeView context, const gfx::Point& point) {
GdkScreen* screen = gdk_screen_get_default();
gint monitor = gdk_screen_get_monitor_at_point(screen, point.x(), point.y());
GdkRectangle bounds;
@@ -129,13 +131,14 @@ gfx::Display Screen::GetDisplayNearestPoint(const gfx::Point& point) {
}
// static
-gfx::Display Screen::GetDisplayMatching(const gfx::Rect& match_rect) {
+gfx::Display Screen::GetDisplayMatching(
+ gfx::NativeView context, const gfx::Rect& match_rect) {
// TODO(thestig) Implement multi-monitor support.
return GetPrimaryDisplay();
}
// static
-gfx::Display Screen::GetPrimaryDisplay() {
+gfx::Display Screen::GetPrimaryDisplay(gfx::NativeView context) {
gfx::Rect bounds = NativePrimaryMonitorBounds();
// TODO(oshima): Implement ID and Observer.
gfx::Display display(0, bounds);
@@ -150,7 +153,7 @@ gfx::Display Screen::GetPrimaryDisplay() {
}
// static
-int Screen::GetNumDisplays() {
+int Screen::GetNumDisplays(gfx::NativeView context) {
// This query is kinda bogus for Linux -- do we want number of X screens?
// The number of monitors Xinerama has? We'll just use whatever GDK uses.
GdkScreen* screen = gdk_screen_get_default();
« ui/gfx/screen_aura.cc ('K') | « ui/gfx/screen_aura.cc ('k') | ui/gfx/screen_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698