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

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

Issue 7840035: Update call sites to account for new WebTouchEvent API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 | no next file » | 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_touch.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_views_touch.cc (revision 99975)
+++ chrome/browser/renderer_host/render_widget_host_view_views_touch.cc (working copy)
@@ -88,12 +88,12 @@
switch (event.type()) {
case ui::ET_TOUCH_PRESSED:
// Add a new touch point.
- if (touch_event_.touchPointsLength <
- WebTouchEvent::touchPointsLengthCap) {
- point = &touch_event_.touchPoints[touch_event_.touchPointsLength++];
+ if (touch_event_.touchesLength <
+ WebTouchEvent::touchesLengthCap) {
+ point = &touch_event_.touches[touch_event_.touchesLength++];
point->id = event.identity();
- if (touch_event_.touchPointsLength == 1) {
+ if (touch_event_.touchesLength == 1) {
// A new touch sequence has started.
status = ui::TOUCH_STATUS_START;
@@ -114,8 +114,8 @@
// _PRESSED event. So find that.
// At the moment, only a maximum of 4 touch-points are allowed. So a
// simple loop should be sufficient.
- for (int i = 0; i < touch_event_.touchPointsLength; ++i) {
- point = touch_event_.touchPoints + i;
+ for (int i = 0; i < touch_event_.touchesLength; ++i) {
+ point = touch_event_.touches + i;
if (point->id == event.identity()) {
break;
}
@@ -149,8 +149,8 @@
UpdateTouchPointPosition(&event, GetMirroredPosition(), point);
// Mark the rest of the points as stationary.
- for (int i = 0; i < touch_event_.touchPointsLength; ++i) {
- WebKit::WebTouchPoint* iter = touch_event_.touchPoints + i;
+ for (int i = 0; i < touch_event_.touchesLength; ++i) {
+ WebKit::WebTouchPoint* iter = touch_event_.touches + i;
if (iter != point) {
iter->state = WebKit::WebTouchPoint::StateStationary;
}
@@ -165,13 +165,13 @@
// If the touch was released, then remove it from the list of touch points.
if (event.type() == ui::ET_TOUCH_RELEASED) {
- --touch_event_.touchPointsLength;
- for (int i = point - touch_event_.touchPoints;
- i < touch_event_.touchPointsLength;
+ --touch_event_.touchesLength;
+ for (int i = point - touch_event_.touches;
+ i < touch_event_.touchesLength;
++i) {
- touch_event_.touchPoints[i] = touch_event_.touchPoints[i + 1];
+ touch_event_.touches[i] = touch_event_.touches[i + 1];
}
- if (touch_event_.touchPointsLength == 0)
+ if (touch_event_.touchesLength == 0)
status = ui::TOUCH_STATUS_END;
} else if (event.type() == ui::ET_TOUCH_CANCELLED) {
status = ui::TOUCH_STATUS_CANCEL;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698