Chromium Code Reviews| 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 |