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> |
| 8 |
7 #include <utility> | 9 #include <utility> |
8 | 10 |
9 #include "base/logging.h" | 11 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
11 #include "build/build_config.h" | 13 #include "build/build_config.h" |
12 #include "third_party/WebKit/public/platform/WebFloatSize.h" | 14 #include "third_party/WebKit/public/platform/WebFloatSize.h" |
13 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h" | 15 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h" |
14 #include "ui/events/gestures/fling_curve.h" | 16 #include "ui/events/gestures/fling_curve.h" |
15 #include "ui/gfx/geometry/safe_integer_conversions.h" | 17 #include "ui/gfx/geometry/safe_integer_conversions.h" |
16 #include "ui/gfx/geometry/vector2d.h" | 18 #include "ui/gfx/geometry/vector2d.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 return still_active; | 136 return still_active; |
135 | 137 |
136 // scrollBy() could delete this curve if the animation is over, so don't touch | 138 // scrollBy() could delete this curve if the animation is over, so don't touch |
137 // any member variables after making that call. | 139 // any member variables after making that call. |
138 bool did_scroll = target->scrollBy(blink::WebFloatSize(delta), | 140 bool did_scroll = target->scrollBy(blink::WebFloatSize(delta), |
139 blink::WebFloatSize(velocity)); | 141 blink::WebFloatSize(velocity)); |
140 return did_scroll && still_active; | 142 return did_scroll && still_active; |
141 } | 143 } |
142 | 144 |
143 } // namespace ui | 145 } // namespace ui |
OLD | NEW |