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

Unified Diff: ui/views/widget/desktop_aura/desktop_screen_x11.h

Issue 2327623002: X11: Add TestDesktopScreenX11 to simulate mouse movement in ui tests (Closed)
Patch Set: Created 4 years, 3 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/views/widget/desktop_aura/desktop_screen_x11.h
diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.h b/ui/views/widget/desktop_aura/desktop_screen_x11.h
index 03f5c6255b03ac75a1684ac4c3fe3836ed4fc073..29298cdc72779bb4e46b4249ec524cff2b60a23e 100644
--- a/ui/views/widget/desktop_aura/desktop_screen_x11.h
+++ b/ui/views/widget/desktop_aura/desktop_screen_x11.h
@@ -14,6 +14,7 @@
#include "ui/display/display_change_notifier.h"
#include "ui/display/screen.h"
#include "ui/events/platform/platform_event_dispatcher.h"
+#include "ui/gfx/geometry/point.h"
#include "ui/gfx/x/x11_atom_cache.h"
#include "ui/views/views_export.h"
@@ -102,6 +103,22 @@ class VIEWS_EXPORT DesktopScreenX11 : public display::Screen,
DISALLOW_COPY_AND_ASSIGN(DesktopScreenX11);
};
+class VIEWS_EXPORT TestDesktopScreenX11 : public DesktopScreenX11 {
sky 2016/09/08 23:41:24 Document what this class does and why it's needed.
Tom (Use chromium acct) 2016/09/09 01:14:11 Done.
+ public:
+ TestDesktopScreenX11();
+ ~TestDesktopScreenX11() override;
+
+ gfx::Point GetCursorScreenPoint() override;
+ void SetCursorScreenPoint(const gfx::Point& point);
+
+ private:
+ gfx::Point cursor_screen_point_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestDesktopScreenX11);
+};
+
+VIEWS_EXPORT TestDesktopScreenX11* GetTestDesktopScreenX11();
+
} // namespace views
#endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_SCREEN_X11_H_
« no previous file with comments | « ui/views/test/ui_controls_factory_desktop_aurax11.cc ('k') | ui/views/widget/desktop_aura/desktop_screen_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698