| 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_;
|
|
|