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

Unified Diff: ui/gfx/screen_win.cc

Issue 8382019: Move DisplayUtils methods into gfx::Screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove DCHECKS Created 9 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_win.cc
diff --git a/ui/gfx/screen_win.cc b/ui/gfx/screen_win.cc
index 530cebee13fa6611c9f695269ba13fbfcc149a5c..2873b72114d35ea9ae74086e2a10d7a3398df433 100644
--- a/ui/gfx/screen_win.cc
+++ b/ui/gfx/screen_win.cc
@@ -54,9 +54,21 @@ gfx::Rect Screen::GetMonitorAreaNearestPoint(const gfx::Point& point) {
return GetMonitorAreaOrWorkAreaNearestPoint(point, false);
}
+// static
gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() {
POINT location;
return GetCursorPos(&location) ? WindowFromPoint(location) : NULL;
}
+// static
+gfx::Size Screen::GetPrimaryMonitorSize() {
+ return gfx::Size(GetSystemMetrics(SM_CXSCREEN),
+ GetSystemMetrics(SM_CYSCREEN));
+}
+
+// static
+int Screen::GetNumMonitors() {
+ return GetSystemMetrics(SM_CMONITORS);
+}
+
} // namespace gfx
« no previous file with comments | « ui/gfx/screen_unittest.cc ('k') | ui/ui_unittests.gypi » ('j') | ui/ui_unittests.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698