OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/blink/web_gesture_curve_impl.h" | 5 #include "ui/events/gestures/blink/web_gesture_curve_impl.h" |
6 | 6 |
7 #include <limits.h> | 7 #include <limits.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram_macros.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "third_party/WebKit/public/platform/WebFloatSize.h" | 15 #include "third_party/WebKit/public/platform/WebFloatSize.h" |
16 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h" | 16 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h" |
17 #include "ui/events/gestures/fling_curve.h" | 17 #include "ui/events/gestures/fling_curve.h" |
18 #include "ui/gfx/geometry/safe_integer_conversions.h" | 18 #include "ui/gfx/geometry/safe_integer_conversions.h" |
19 #include "ui/gfx/geometry/vector2d.h" | 19 #include "ui/gfx/geometry/vector2d.h" |
20 | 20 |
21 #if defined(OS_ANDROID) | 21 #if defined(OS_ANDROID) |
22 #include "ui/events/android/scroller.h" | 22 #include "ui/events/android/scroller.h" |
23 #endif | 23 #endif |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 return still_active; | 138 return still_active; |
139 | 139 |
140 // scrollBy() could delete this curve if the animation is over, so don't touch | 140 // scrollBy() could delete this curve if the animation is over, so don't touch |
141 // any member variables after making that call. | 141 // any member variables after making that call. |
142 bool did_scroll = target->scrollBy(blink::WebFloatSize(delta), | 142 bool did_scroll = target->scrollBy(blink::WebFloatSize(delta), |
143 blink::WebFloatSize(velocity)); | 143 blink::WebFloatSize(velocity)); |
144 return did_scroll && still_active; | 144 return did_scroll && still_active; |
145 } | 145 } |
146 | 146 |
147 } // namespace ui | 147 } // namespace ui |
OLD | NEW |