Chromium Code Reviews| Index: ui/base/test/ui_controls.h |
| diff --git a/ui/base/test/ui_controls.h b/ui/base/test/ui_controls.h |
| index 4fc54abb126c56a822c587540300e742c586f143..a4e48823ac0362c134dca12d778719934309eb2f 100644 |
| --- a/ui/base/test/ui_controls.h |
| +++ b/ui/base/test/ui_controls.h |
| @@ -80,6 +80,8 @@ enum MouseButtonState { |
| DOWN = 2 |
| }; |
| +enum TouchType { PRESS = 1 << 0, RELEASE = 1 << 1, MOVE = 1 << 2 }; |
| + |
| // Sends a mouse down and/or up message. The click will be sent to wherever |
| // the cursor currently is, so be sure to move the cursor before calling this |
| // (and be sure the cursor has arrived!). |
| @@ -91,6 +93,13 @@ bool SendMouseEventsNotifyWhenDone(MouseButton type, |
| // Same as SendMouseEvents with UP | DOWN. |
| bool SendMouseClick(MouseButton type); |
| +// Send WM_POINTER messages to generate touch events. There is no way to detect |
| +// when events are received by chrome, it's up to users of this API to detect |
| +// when events arrive. |action| is a bitmask of the TouchType constants that |
| +// indicate what events are generated, |num| is the number of the touch |
| +// pointers, |x| and |y| are the coordinates of the touch pointers. |
|
sky
2017/06/27 02:19:47
in screen coordinates, right?
lanwei
2017/06/27 18:55:42
Yes, they are in screen coordinates.
|
| +bool SendTouchEvents(int action, int num, int x, int y); |
|
sky
2017/06/27 02:19:47
I believe you've only implemented this for windows
lanwei
2017/06/27 18:55:42
Done.
|
| + |
| #if defined(TOOLKIT_VIEWS) |
| // Runs |closure| after processing all pending ui events. |
| void RunClosureAfterAllPendingUIEvents(const base::Closure& closure); |