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

Unified Diff: ui/base/test/ui_controls.h

Issue 2904113002: Replacing WM_TOUCH with WM_POINTER for touch events on Wins 8+ (Closed)
Patch Set: wm touch Created 3 years, 6 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
« no previous file with comments | « ui/aura/test/ui_controls_factory_aurawin.cc ('k') | ui/base/test/ui_controls_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..631d8041b18df7ac955ed9492836b29a10d5ed2e 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,16 @@ bool SendMouseEventsNotifyWhenDone(MouseButton type,
// Same as SendMouseEvents with UP | DOWN.
bool SendMouseClick(MouseButton type);
+#if defined(OS_WIN)
+// 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, |screen_x| and |screen_y| are the screen coordinates of a touch
+// pointer.
+bool SendTouchEvents(int action, int num, int screen_x, int screen_y);
+#endif
+
#if defined(TOOLKIT_VIEWS)
// Runs |closure| after processing all pending ui events.
void RunClosureAfterAllPendingUIEvents(const base::Closure& closure);
« no previous file with comments | « ui/aura/test/ui_controls_factory_aurawin.cc ('k') | ui/base/test/ui_controls_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698