summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/render_widget_host_view_win.h
diff options
context:
space:
mode:
authoriyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-02 02:03:05 +0000
committeriyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-02 02:03:05 +0000
commit11397833d1acfc4984cff924024c041aaf580462 (patch)
treec040d6c73bd23e57290ca8206452ce247de04995 /content/browser/renderer_host/render_widget_host_view_win.h
parente3c1326ddfa275c69ec8334e6113d835f63c104a (diff)
downloadchromium_src-11397833d1acfc4984cff924024c041aaf580462.zip
chromium_src-11397833d1acfc4984cff924024c041aaf580462.tar.gz
chromium_src-11397833d1acfc4984cff924024c041aaf580462.tar.bz2
Add support for touch based zoom gesture on Windows. This change also handles the WM_POINTERDOWN
and WM_POINTERUP messages to scroll the page if we touch the scrollbar. BUG=none TEST=Touch based zoom should work on Windows. Review URL: http://codereview.chromium.org/8399009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108232 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/render_widget_host_view_win.h')
-rw-r--r--content/browser/renderer_host/render_widget_host_view_win.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_win.h b/content/browser/renderer_host/render_widget_host_view_win.h
index 0c09e6f..88b09ee 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.h
+++ b/content/browser/renderer_host/render_widget_host_view_win.h
@@ -50,6 +50,21 @@ typedef CWinTraits<WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 0>
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
//
@@ -130,6 +145,8 @@ class RenderWidgetHostViewWin
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()
@@ -244,6 +261,10 @@ class RenderWidgetHostViewWin
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);
@@ -420,6 +441,14 @@ class RenderWidgetHostViewWin
ui::Range composition_range_;
+ // 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);
};