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

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

Issue 10824158: Pass tap count (1 or 2) with tap gesture events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk Created 8 years, 4 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/web_input_event_aurax11.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.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index f2b517c87dd54d03561d506f3a29985222f85dd7..752d45c009c6e3e2f90d3f6f06e789d4d54a481b 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -415,10 +415,27 @@ class LocalGestureEvent :
data().y = client_point.y;
data().globalX = screen_point.x;
data().globalY = screen_point.y;
- data().deltaX = details.generic_x();
- data().deltaY = details.generic_y();
data().type = ConvertToWebInputEvent(type_);
data().boundingBox = details.bounding_box();
+
+ // Copy any event-type specific data.
+ switch (type_) {
+ case ui::ET_GESTURE_TAP:
+ data().deltaX = details.tap_count();
+ break;
+ case ui::ET_GESTURE_SCROLL_UPDATE:
+ data().deltaX = details.scroll_x();
+ data().deltaY = details.scroll_y();
+ break;
+ case ui::ET_GESTURE_PINCH_UPDATE:
+ data().deltaX = details.scale();
+ break;
+ case ui::ET_SCROLL_FLING_START:
+ data().deltaX = details.velocity_x();
+ data().deltaY = details.velocity_y();
+ default:
+ break;
+ }
}
virtual int GetLowestTouchId() const OVERRIDE {
« no previous file with comments | « no previous file | content/browser/renderer_host/web_input_event_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698