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

Unified Diff: ui/gfx/screen_aura.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
« no previous file with comments | « ui/gfx/screen.h ('k') | ui/gfx/screen_gtk.cc » ('j') | ui/ui_unittests.gypi » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/screen_aura.cc
diff --git a/ui/gfx/screen_aura.cc b/ui/gfx/screen_aura.cc
index 097fe8cf20e6e303408719fc707c2d778c110f11..0093af6aceb26a423ad06302f4f8a557abae0741 100644
--- a/ui/gfx/screen_aura.cc
+++ b/ui/gfx/screen_aura.cc
@@ -24,38 +24,42 @@ void Screen::SetInstance(Screen* screen) {
// static
gfx::Point Screen::GetCursorScreenPoint() {
- DCHECK(instance_);
return instance_->GetCursorScreenPointImpl();
}
// static
gfx::Rect Screen::GetMonitorWorkAreaNearestWindow(gfx::NativeWindow window) {
- DCHECK(instance_);
return instance_->GetMonitorWorkAreaNearestWindowImpl(window);
}
// static
gfx::Rect Screen::GetMonitorAreaNearestWindow(gfx::NativeWindow window) {
- DCHECK(instance_);
return instance_->GetMonitorAreaNearestWindowImpl(window);
}
// static
gfx::Rect Screen::GetMonitorWorkAreaNearestPoint(const gfx::Point& point) {
- DCHECK(instance_);
return instance_->GetMonitorWorkAreaNearestPointImpl(point);
}
// static
gfx::Rect Screen::GetMonitorAreaNearestPoint(const gfx::Point& point) {
- DCHECK(instance_);
return instance_->GetMonitorAreaNearestPointImpl(point);
}
// static
gfx::NativeWindow Screen::GetWindowAtCursorScreenPoint() {
- DCHECK(instance_);
return instance_->GetWindowAtCursorScreenPointImpl();
}
+// static
+gfx::Size Screen::GetPrimaryMonitorSize() {
+ return instance_->GetPrimaryMonitorSizeImpl();
+}
+
+// static
+int Screen::GetNumMonitors() {
+ return instance_->GetNumMonitorsImpl();
+}
+
} // namespace gfx
« no previous file with comments | « ui/gfx/screen.h ('k') | ui/gfx/screen_gtk.cc » ('j') | ui/ui_unittests.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698