Index: ui/aura/test/test_screen.h |
diff --git a/ui/aura/test/test_screen.h b/ui/aura/test/test_screen.h |
index 59fe63dba8f5056eba6dbbe18ea549dca950c9ea..7923d3d15a63f0bdb159d291db7de1b01d52d61c 100644 |
--- a/ui/aura/test/test_screen.h |
+++ b/ui/aura/test/test_screen.h |
@@ -7,39 +7,45 @@ |
#pragma once |
#include "base/compiler_specific.h" |
+#include "base/memory/scoped_ptr.h" |
#include "ui/gfx/insets.h" |
#include "ui/gfx/screen.h" |
+namespace gfx { |
+class Monitor; |
+} |
+ |
namespace aura { |
class RootWindow; |
+class MonitorAura; |
// A minimal, testing Aura implementation of gfx::Screen. |
-class TestScreen : public gfx::Screen { |
+class TestScreen : public gfx::ScreenImpl { |
public: |
explicit TestScreen(aura::RootWindow* root_window); |
virtual ~TestScreen(); |
protected: |
- virtual gfx::Point GetCursorScreenPointImpl() OVERRIDE; |
- virtual gfx::Rect GetMonitorWorkAreaNearestWindowImpl( |
- gfx::NativeView view) OVERRIDE; |
- virtual gfx::Rect GetMonitorAreaNearestWindowImpl( |
+ // gfx::ScreenImpl overrides: |
+ virtual gfx::Point GetCursorScreenPoint() OVERRIDE; |
+ virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; |
+ virtual int GetNumMonitors() OVERRIDE; |
+ virtual const gfx::Monitor* GetMonitorNearestWindow( |
gfx::NativeView view) OVERRIDE; |
- virtual gfx::Rect GetMonitorWorkAreaNearestPointImpl( |
+ virtual const gfx::Monitor* GetMonitorNearestPoint( |
const gfx::Point& point) OVERRIDE; |
- virtual gfx::Rect GetMonitorAreaNearestPointImpl( |
- const gfx::Point& point) OVERRIDE; |
- virtual gfx::NativeWindow GetWindowAtCursorScreenPointImpl() OVERRIDE; |
- virtual gfx::Size GetPrimaryMonitorSizeImpl() OVERRIDE; |
- virtual int GetNumMonitorsImpl() OVERRIDE; |
+ virtual const gfx::Monitor* GetPrimaryMonitor() OVERRIDE; |
+ virtual void AddMonitorObserver(gfx::MonitorObserver* observer) OVERRIDE; |
+ virtual void RemoveMonitorObserver(gfx::MonitorObserver* observer) OVERRIDE; |
private: |
- // We currently support only one monitor. These two methods return the bounds |
- // and work area. |
- gfx::Rect GetBounds(); |
+ void Update(); |
aura::RootWindow* root_window_; |
+ // One monitor in testing environment. |
+ scoped_ptr<MonitorAura> monitor_; |
+ |
DISALLOW_COPY_AND_ASSIGN(TestScreen); |
}; |