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

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 rjkroege'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..bd282a3e0341ebf1670fa3124aae8045c0f9c233 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,
sky 2011/06/10 19:47:38 Make event be by ref as you don't need it to be NU
+ 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