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

Unified Diff: chrome/browser/renderer_host/render_widget_host_view_views.cc

Issue 7129008: Update rich touch information to conform to standard (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: addressing sky's comments Created 9 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 | « no previous file | views/events/event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/render_widget_host_view_views.cc
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.cc b/chrome/browser/renderer_host/render_widget_host_view_views.cc
index b9ebf768e239fcf1454f88401e7ac4b2cc58a862..5de0124b7c5f525aae46bfd4ffd82b47edb7b86b 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_views.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc
@@ -107,6 +107,13 @@ WebKit::WebInputEvent::Type TouchEventTypeFromEvent(
}
}
+inline void UpdateTouchParams(const views::TouchEvent& event,
+ WebKit::WebTouchPoint* tpoint) {
+ tpoint->radiusX = event.radius_x();
+ tpoint->radiusY = event.radius_y();
+ tpoint->rotationAngle = event.angle();
+}
+
void UpdateTouchPointPosition(const views::TouchEvent* event,
const gfx::Point& origin,
WebKit::WebTouchPoint* tpoint) {
@@ -563,6 +570,8 @@ views::View::TouchStatus RenderWidgetHostViewViews::OnTouchEvent(
if (status != TOUCH_STATUS_START)
status = TOUCH_STATUS_CONTINUE;
+ UpdateTouchParams(event, point);
+
// Update the location and state of the point.
point->state = TouchPointStateFromEvent(&event);
if (point->state == WebKit::WebTouchPoint::StateMoved) {
« no previous file with comments | « no previous file | views/events/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698