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

Unified Diff: ui/events/test/event_generator.h

Issue 2560633002: exo: Implement v6 of touch protocol including shape and frame event (Closed)
Patch Set: Fixed pen pointer mode conflict after rebase Created 4 years 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 | « components/exo/wayland/server.cc ('k') | ui/events/test/event_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/test/event_generator.h
diff --git a/ui/events/test/event_generator.h b/ui/events/test/event_generator.h
index 0850806cf5e24941fa22a5ee893ba34e6f42e6c9..c20dc79a8570363c0b1e539af36b561a230a8ec0 100644
--- a/ui/events/test/event_generator.h
+++ b/ui/events/test/event_generator.h
@@ -12,7 +12,7 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/time/time.h"
-#include "ui/events/event_constants.h"
+#include "ui/events/event.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/native_widget_types.h"
@@ -26,10 +26,8 @@ class PointF;
}
namespace ui {
-class Event;
class EventSource;
class EventTarget;
-class KeyEvent;
namespace test {
@@ -238,6 +236,9 @@ class EventGenerator {
// type event.
void ExitPenPointerMode();
+ // Set radius of touch PointerDetails.
+ void SetTouchRadius(float x, float y);
+
// Generates a touch press event.
void PressTouch();
@@ -247,9 +248,20 @@ class EventGenerator {
// Generates a ET_TOUCH_MOVED event to |point|.
void MoveTouch(const gfx::Point& point);
+ // Generates a ET_TOUCH_MOVED event moving by (x, y) from current location.
+ void MoveTouchBy(int x, int y) {
+ MoveTouch(current_location_ + gfx::Vector2d(x, y));
+ }
+
// Generates a ET_TOUCH_MOVED event to |point| with |touch_id|.
void MoveTouchId(const gfx::Point& point, int touch_id);
+ // Generates a ET_TOUCH_MOVED event moving (x, y) from current location with
+ // |touch_id|.
+ void MoveTouchIdBy(int touch_id, int x, int y) {
+ MoveTouchId(current_location_ + gfx::Vector2d(x, y), touch_id);
+ }
+
// Generates a touch release event.
void ReleaseTouch();
@@ -417,7 +429,8 @@ class EventGenerator {
EventTarget* current_target_;
int flags_;
bool grab_;
- bool pen_pointer_mode_ = false;
+ ui::PointerDetails touch_pointer_details_;
+
std::list<std::unique_ptr<Event>> pending_events_;
// Set to true to cause events to be posted asynchronously.
bool async_;
« no previous file with comments | « components/exo/wayland/server.cc ('k') | ui/events/test/event_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698