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

Unified Diff: ui/gfx/screen.cc

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix command line Created 8 years, 8 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.cc
diff --git a/ui/gfx/screen.cc b/ui/gfx/screen.cc
new file mode 100644
index 0000000000000000000000000000000000000000..58d706fd36f1b5d2fcd39a58a33fdef6559f26e7
--- /dev/null
+++ b/ui/gfx/screen.cc
@@ -0,0 +1,33 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/gfx/screen.h"
+
+#include "ui/gfx/monitor.h"
+
+namespace gfx {
+
+// Utility functions to get Monitor bounds/WorkArea bounds.
+// static
+gfx::Rect Screen::GetMonitorAreaNearestWindow(gfx::NativeView view) {
+ return GetMonitorNearestWindow(view)->GetBounds();
+}
+
+gfx::Rect Screen::GetMonitorWorkAreaNearestWindow(gfx::NativeView view) {
+ return GetMonitorNearestWindow(view)->GetWorkArea();
+}
+
+gfx::Rect Screen::GetMonitorAreaNearestPoint(const gfx::Point& point) {
+ return GetMonitorNearestPoint(point)->GetBounds();
+}
+
+gfx::Rect Screen::GetMonitorWorkAreaNearestPoint(const gfx::Point& point) {
+ return GetMonitorNearestPoint(point)->GetWorkArea();
+}
+
+#if defined(USE_AURA)
+ScreenImpl::~ScreenImpl() {}
+#endif
+
+} // namespace gfx

Powered by Google App Engine
This is Rietveld 408576698