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

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

Issue 8399009: Add support for touch based zoom gesture on Windows. This change also handles the WM_POINTERDOWN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | « no previous file | content/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_win.h
===================================================================
--- content/browser/renderer_host/render_widget_host_view_win.h (revision 107928)
+++ content/browser/renderer_host/render_widget_host_view_win.h (working copy)
@@ -50,6 +50,21 @@
CONTENT_EXPORT extern const wchar_t kRenderWidgetHostHWNDClass[];
+// TODO(ananta)
+// This should be removed once we have the new windows SDK which defines these
+// messages.
+#if !defined(WM_POINTERUPDATE)
+#define WM_POINTERUPDATE 0x0245
+#endif // WM_POINTERUPDATE
+
+#if !defined(WM_POINTERDOWN)
+#define WM_POINTERDOWN 0x0246
+#endif // WM_POINTERDOWN
+
+#if !defined(WM_POINTERUP)
+#define WM_POINTERUP 0x0247
+#endif // WM_POINTERUP
+
///////////////////////////////////////////////////////////////////////////////
// RenderWidgetHostViewWin
//
@@ -129,6 +144,8 @@
MESSAGE_HANDLER(WM_MOUSEACTIVATE, OnMouseActivate)
MESSAGE_HANDLER(WM_GETOBJECT, OnGetObject)
MESSAGE_HANDLER(WM_PARENTNOTIFY, OnParentNotify)
+ MESSAGE_HANDLER(WM_POINTERDOWN, OnPointerMessage)
+ MESSAGE_HANDLER(WM_POINTERUP, OnPointerMessage)
MESSAGE_HANDLER(WM_GESTURE, OnGestureEvent)
END_MSG_MAP()
@@ -240,6 +257,10 @@
LRESULT OnParentNotify(UINT message, WPARAM wparam, LPARAM lparam,
BOOL& handled);
+
+ // Handle the new pointer messages
+ LRESULT OnPointerMessage(UINT message, WPARAM wparam, LPARAM lparam,
+ BOOL& handled);
// Handle high-level touch events.
LRESULT OnGestureEvent(UINT message, WPARAM wparam, LPARAM lparam,
BOOL& handled);
@@ -411,6 +432,14 @@
// back, we regard the mouse movement as (0, 0).
bool ignore_mouse_movement_;
+ // Set to true if the next lbutton down message is to be ignored. Set by the
+ // WM_POINTERXX handler. We do this to ensure that we don't send out
+ // duplicate lbutton down messages to the renderer.
+ bool ignore_next_lbutton_message_at_same_location;
+ // The location of the last WM_POINTERDOWN message. We ignore the subsequent
+ // lbutton down only if the locations match.
+ LPARAM last_pointer_down_location_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewWin);
};
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698