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" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "ui/base/events/event.h" | 14 #include "ui/base/events/event.h" |
15 #include "ui/base/events/event_constants.h" | 15 #include "ui/base/events/event_constants.h" |
16 #include "ui/base/gestures/gesture_configuration.h" | 16 #include "ui/base/gestures/gesture_configuration.h" |
17 #include "ui/base/gestures/gesture_util.h" | 17 #include "ui/base/gestures/gesture_util.h" |
18 #include "ui/gfx/rect.h" | 18 #include "ui/gfx/rect.h" |
19 | 19 |
20 namespace ui { | 20 namespace ui { |
21 | 21 |
22 namespace { | 22 namespace { |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 return; | 1143 return; |
1144 | 1144 |
1145 // Since long press timer has been started, there should be a non-NULL point. | 1145 // Since long press timer has been started, there should be a non-NULL point. |
1146 const GesturePoint* point = GetPointByPointId(0); | 1146 const GesturePoint* point = GetPointByPointId(0); |
1147 if (!ui::gestures::IsInsideManhattanSquare(point->first_touch_position(), | 1147 if (!ui::gestures::IsInsideManhattanSquare(point->first_touch_position(), |
1148 event.location())) | 1148 event.location())) |
1149 GetLongPressTimer()->Stop(); | 1149 GetLongPressTimer()->Stop(); |
1150 } | 1150 } |
1151 | 1151 |
1152 } // namespace ui | 1152 } // namespace ui |
OLD | NEW |