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

Unified Diff: ui/gfx/screen_gtk.cc

Issue 10540091: Rename gfx::Monitor to gfx::Display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 4df13b6274df47e41e25bf34aa5c8641852e9347..1bc577fdb68625e9421a3c8bf60390455eb104cc 100644
--- a/ui/gfx/screen_gtk.cc
+++ b/ui/gfx/screen_gtk.cc
@@ -8,7 +8,7 @@
#include <gtk/gtk.h>
#include "base/logging.h"
-#include "ui/gfx/monitor.h"
+#include "ui/gfx/display.h"
namespace {
@@ -103,7 +103,7 @@ gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() {
}
// static
-gfx::Monitor Screen::GetMonitorNearestWindow(gfx::NativeView view) {
+gfx::Display Screen::GetMonitorNearestWindow(gfx::NativeView view) {
gfx::Rect bounds = GetMonitorAreaNearestWindow(view);
// Do not use the _NET_WORKAREA here, this is supposed to be an area on a
// specific monitor, and _NET_WORKAREA is a hint from the WM that generally
@@ -113,38 +113,38 @@ gfx::Monitor Screen::GetMonitorNearestWindow(gfx::NativeView view) {
// area, but it is a rect that we should be computing. The standard means
// to compute this rect would be to watch all windows with
// _NET_WM_STRUT(_PARTIAL) hints, and subtract their space from the physical
- // area of the monitor to construct a work area.
+ // area of the display to construct a work area.
// TODO(oshima): Implement ID and Observer.
- return gfx::Monitor(0, bounds);
+ return gfx::Display(0, bounds);
}
// static
-gfx::Monitor Screen::GetMonitorNearestPoint(const gfx::Point& point) {
+gfx::Display Screen::GetMonitorNearestPoint(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;
gdk_screen_get_monitor_geometry(screen, monitor, &bounds);
// TODO(oshima): Implement ID and Observer.
- return gfx::Monitor(0, gfx::Rect(bounds));
+ return gfx::Display(0, gfx::Rect(bounds));
}
// static
-gfx::Monitor Screen::GetPrimaryMonitor() {
+gfx::Display Screen::GetPrimaryMonitor() {
gfx::Rect bounds = NativePrimaryMonitorBounds();
// TODO(oshima): Implement ID and Observer.
- gfx::Monitor monitor(0, bounds);
+ gfx::Display display(0, bounds);
gfx::Rect rect;
if (GetScreenWorkArea(&rect)) {
- monitor.set_work_area(rect.Intersect(bounds));
+ display.set_work_area(rect.Intersect(bounds));
} else {
// Return the best we've got.
- monitor.set_work_area(bounds);
+ display.set_work_area(bounds);
}
- return monitor;
+ return display;
}
// static
-gfx::Monitor Screen::GetMonitorMatching(const gfx::Rect& match_rect) {
+gfx::Display Screen::GetMonitorMatching(const gfx::Rect& match_rect) {
// TODO(thestig) Implement multi-monitor support.
return GetPrimaryMonitor();
}
« ui/gfx/screen.h ('K') | « ui/gfx/screen_aura.cc ('k') | ui/gfx/screen_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698