Index: ui/views/widget/desktop_aura/desktop_screen_x11.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.cc b/ui/views/widget/desktop_aura/desktop_screen_x11.cc |
index d3d2315bce9cb981ed62c4ab33d61c80d3616150..f0ada13946acc1e2cd324d45ae8c9e807c97fc6a 100644 |
--- a/ui/views/widget/desktop_aura/desktop_screen_x11.cc |
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11.cc |
@@ -405,9 +405,31 @@ void DesktopScreenX11::SetDisplaysInternal( |
} |
//////////////////////////////////////////////////////////////////////////////// |
+// TestDesktopScreenX11, public: |
+ |
+TestDesktopScreenX11::TestDesktopScreenX11() {} |
+ |
+TestDesktopScreenX11::~TestDesktopScreenX11() {} |
+ |
+gfx::Point TestDesktopScreenX11::GetCursorScreenPoint() { |
+ return cursor_screen_point_; |
+} |
+ |
+void TestDesktopScreenX11::SetCursorScreenPoint(const gfx::Point& point) { |
+ cursor_screen_point_ = point; |
+} |
+ |
+//////////////////////////////////////////////////////////////////////////////// |
display::Screen* CreateDesktopScreen() { |
return new DesktopScreenX11; |
} |
+TestDesktopScreenX11* GetTestDesktopScreenX11() { |
+ static std::unique_ptr<TestDesktopScreenX11> test_screen_instance; |
+ if (!test_screen_instance.get()) |
+ test_screen_instance.reset(new TestDesktopScreenX11()); |
+ return test_screen_instance.get(); |
+} |
+ |
} // namespace views |