OLD | NEW |
---|---|
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/base/gestures/gesture_sequence.h" | 5 #include "ui/base/gestures/gesture_sequence.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
713 else if (scroll_type_ == ST_VERTICAL) | 713 else if (scroll_type_ == ST_VERTICAL) |
714 railed_x_velocity = 0; | 714 railed_x_velocity = 0; |
715 | 715 |
716 if (railed_x_velocity != 0 || railed_y_velocity != 0) { | 716 if (railed_x_velocity != 0 || railed_y_velocity != 0) { |
717 | 717 |
718 gestures->push_back(CreateGestureEvent( | 718 gestures->push_back(CreateGestureEvent( |
719 GestureEventDetails(ui::ET_SCROLL_FLING_START, | 719 GestureEventDetails(ui::ET_SCROLL_FLING_START, |
720 CalibrateFlingVelocity(railed_x_velocity), | 720 CalibrateFlingVelocity(railed_x_velocity), |
721 CalibrateFlingVelocity(railed_y_velocity)), | 721 CalibrateFlingVelocity(railed_y_velocity)), |
722 location, | 722 location, |
723 flags_, | 723 flags_ | EF_FROM_TOUCH, |
sky
2013/01/22 18:05:01
Why would we only set EF_FROM_TOUCH for fling star
sadrul
2013/01/22 20:07:24
I agree. The best place would be to set the flag i
DaveMoore
2013/01/27 21:21:54
Done.
DaveMoore
2013/01/27 21:21:54
Done.
| |
724 base::Time::FromDoubleT(point.last_touch_time()), | 724 base::Time::FromDoubleT(point.last_touch_time()), |
725 1 << point.touch_id())); | 725 1 << point.touch_id())); |
726 } else { | 726 } else { |
727 gestures->push_back(CreateGestureEvent( | 727 gestures->push_back(CreateGestureEvent( |
728 GestureEventDetails(ui::ET_GESTURE_SCROLL_END, 0, 0), | 728 GestureEventDetails(ui::ET_GESTURE_SCROLL_END, 0, 0), |
729 location, | 729 location, |
730 flags_, | 730 flags_, |
731 base::Time::FromDoubleT(point.last_touch_time()), | 731 base::Time::FromDoubleT(point.last_touch_time()), |
732 1 << point.touch_id())); | 732 1 << point.touch_id())); |
733 } | 733 } |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1124 return; | 1124 return; |
1125 | 1125 |
1126 // Since long press timer has been started, there should be a non-NULL point. | 1126 // Since long press timer has been started, there should be a non-NULL point. |
1127 const GesturePoint* point = GetPointByPointId(0); | 1127 const GesturePoint* point = GetPointByPointId(0); |
1128 if (!ui::gestures::IsInsideManhattanSquare(point->first_touch_position(), | 1128 if (!ui::gestures::IsInsideManhattanSquare(point->first_touch_position(), |
1129 event.location())) | 1129 event.location())) |
1130 GetLongPressTimer()->Stop(); | 1130 GetLongPressTimer()->Stop(); |
1131 } | 1131 } |
1132 | 1132 |
1133 } // namespace ui | 1133 } // namespace ui |
OLD | NEW |