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

Unified Diff: content/browser/renderer_host/render_widget_host_view_win.h

Issue 8341125: Forward Windows touch messages to the renderer (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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: content/browser/renderer_host/render_widget_host_view_win.h
===================================================================
--- content/browser/renderer_host/render_widget_host_view_win.h (revision 108760)
+++ content/browser/renderer_host/render_widget_host_view_win.h (working copy)
@@ -141,6 +141,7 @@
MESSAGE_HANDLER(WM_VSCROLL, OnWheelEvent)
MESSAGE_HANDLER(WM_CHAR, OnKeyEvent)
MESSAGE_HANDLER(WM_SYSCHAR, OnKeyEvent)
+ MESSAGE_HANDLER(WM_TOUCH, OnTouchEvent)
MESSAGE_HANDLER(WM_IME_CHAR, OnKeyEvent)
MESSAGE_HANDLER(WM_MOUSEACTIVATE, OnMouseActivate)
MESSAGE_HANDLER(WM_GETOBJECT, OnGetObject)
@@ -247,6 +248,8 @@
UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled);
LRESULT OnWheelEvent(
UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled);
+ LRESULT OnTouchEvent(
+ UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled);
LRESULT OnMouseActivate(UINT message,
WPARAM wparam,
LPARAM lparam,
@@ -329,6 +332,17 @@
void HandleLockedMouseEvent(UINT message, WPARAM wparam, LPARAM lparam);
+ // Copy details from a TOUCHINPUT to an existing WebTouchPoint, returning
+ // true if the resulting point is a stationary move.
+ bool UpdateTouchPoint(WebKit::WebTouchPoint* touch_point,
+ TOUCHINPUT* touch_input);
+
+ // Adds a touch point or returns NULL if there's not enough space.
+ WebKit::WebTouchPoint* AddTouchPoint(TOUCHINPUT* touch_input);
+
+ // Completes a touch event if needed (e.g. due to a focus change)
+ void FinishTouchEvent();
cpu_(ooo_6.6-7.5) 2011/11/08 02:34:04 You are going to hate me but I have the urge to te
jschuh 2011/11/08 17:12:41 Yeah, I was thinking about that but I anticipate s
cpu_(ooo_6.6-7.5) 2011/11/08 19:20:14 I think now it's a good time. If you want you can
+
LRESULT OnDocumentFeed(RECONVERTSTRING* reconv);
LRESULT OnReconvertString(RECONVERTSTRING* reconv);
@@ -367,6 +381,11 @@
// true if the View is not visible.
bool is_hidden_;
+ // The touch-event. Its touch-points are updated as necessary. A new
+ // touch-point is added from an TOUCHEVENTF_DOWN message, and a touch-point
+ // is removed from the list on an TOUCHEVENTF_UP message.
+ WebKit::WebTouchEvent touch_event_;
+
// True if we're in the midst of a paint operation and should respond to
// DidPaintRect() notifications by merely invalidating. See comments on
// render_widget_host_view.h:DidPaintRect().

Powered by Google App Engine
This is Rietveld 408576698