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

Unified Diff: ui/gfx/screen.h

Issue 8205018: Gets component build to work with aura. As part of this I needed to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/DEPS ('k') | ui/gfx/screen_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/screen.h
diff --git a/ui/gfx/screen.h b/ui/gfx/screen.h
index efecc879ec75b28f03d5d63b11fc7cba166cb6d1..458ed447888ba323de54d62430551b82aafe0c8c 100644
--- a/ui/gfx/screen.h
+++ b/ui/gfx/screen.h
@@ -17,6 +17,15 @@ namespace gfx {
// TODO(erikkay) add more of those methods here
class UI_EXPORT Screen {
public:
+ virtual ~Screen() {}
+
+#if defined(USE_AURA)
+ // Sets the instance to use. This takes owernship of |screen|, deleting the
+ // old instant. This is used on aura to avoid circular dependencies between ui
Ben Goodger (Google) 2011/10/08 00:57:32 instance
+ // and aura.
+ static void SetInstance(Screen* screen);
+#endif
+
static gfx::Point GetCursorScreenPoint();
// Returns the work area of the monitor nearest the specified window.
@@ -34,6 +43,22 @@ class UI_EXPORT Screen {
// Returns the window under the cursor.
static gfx::NativeWindow GetWindowAtCursorScreenPoint();
+
+ protected:
+ virtual gfx::Rect GetMonitorWorkAreaNearestWindowImpl(
+ gfx::NativeView view) = 0;
+ virtual gfx::Rect GetMonitorAreaNearestWindowImpl(
+ gfx::NativeView view) = 0;
+ virtual gfx::Rect GetMonitorWorkAreaNearestPointImpl(
+ const gfx::Point& point) = 0;
+ virtual gfx::Rect GetMonitorAreaNearestPointImpl(const gfx::Point& point) = 0;
+ virtual gfx::NativeWindow GetWindowAtCursorScreenPointImpl() = 0;
+
+private:
+#if defined(USE_AURA)
+ // The singleton screen instance. Only used on aura.
+ static Screen* instance_;
+#endif
};
} // namespace gfx
« no previous file with comments | « ui/gfx/DEPS ('k') | ui/gfx/screen_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698