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

Side by Side Diff: ui/events/gestures/gesture_sequence.cc

Issue 302463004: Implementing the dispatch of the swipe gesture for one-finger touch swipes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implementing review feedback. Created 6 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 unified diff | Download patch
« no previous file with comments | « ui/events/gesture_event_details.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/gestures/gesture_sequence.h" 5 #include "ui/events/gestures/gesture_sequence.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <cmath> 8 #include <cmath>
9 #include <limits> 9 #include <limits>
10 10
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 flags_, 1081 flags_,
1082 base::Time::FromDoubleT(point.last_touch_time()), 1082 base::Time::FromDoubleT(point.last_touch_time()),
1083 ComputeTouchBitmask(points_))); 1083 ComputeTouchBitmask(points_)));
1084 } 1084 }
1085 1085
1086 void GestureSequence::AppendSwipeGesture(const GesturePoint& point, 1086 void GestureSequence::AppendSwipeGesture(const GesturePoint& point,
1087 int swipe_x, 1087 int swipe_x,
1088 int swipe_y, 1088 int swipe_y,
1089 Gestures* gestures) { 1089 Gestures* gestures) {
1090 gestures->push_back(CreateGestureEvent( 1090 gestures->push_back(CreateGestureEvent(
1091 GestureEventDetails(ui::ET_GESTURE_MULTIFINGER_SWIPE, swipe_x, swipe_y), 1091 GestureEventDetails(ui::ET_GESTURE_SWIPE, swipe_x, swipe_y),
1092 bounding_box_.CenterPoint(), 1092 bounding_box_.CenterPoint(),
1093 flags_, 1093 flags_,
1094 base::Time::FromDoubleT(point.last_touch_time()), 1094 base::Time::FromDoubleT(point.last_touch_time()),
1095 ComputeTouchBitmask(points_))); 1095 ComputeTouchBitmask(points_)));
1096 } 1096 }
1097 1097
1098 void GestureSequence::AppendTwoFingerTapGestureEvent(Gestures* gestures) { 1098 void GestureSequence::AppendTwoFingerTapGestureEvent(Gestures* gestures) {
1099 const GesturePoint* point = GetPointByPointId(0); 1099 const GesturePoint* point = GetPointByPointId(0);
1100 const gfx::RectF& rect = point->enclosing_rectangle(); 1100 const gfx::RectF& rect = point->enclosing_rectangle();
1101 gestures->push_back(CreateGestureEvent( 1101 gestures->push_back(CreateGestureEvent(
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 } 1458 }
1459 1459
1460 void GestureSequence::StartRailFreeScroll(const GesturePoint& point, 1460 void GestureSequence::StartRailFreeScroll(const GesturePoint& point,
1461 Gestures* gestures) { 1461 Gestures* gestures) {
1462 AppendScrollGestureBegin(point, point.first_touch_position(), gestures); 1462 AppendScrollGestureBegin(point, point.first_touch_position(), gestures);
1463 scroll_type_ = ST_FREE; 1463 scroll_type_ = ST_FREE;
1464 set_state(GS_SCROLL); 1464 set_state(GS_SCROLL);
1465 } 1465 }
1466 1466
1467 } // namespace ui 1467 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gesture_event_details.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698