| 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 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 if (delta.IsZero()) | 146 if (delta.IsZero()) |
| 147 return still_active; | 147 return still_active; |
| 148 | 148 |
| 149 // scrollBy() could delete this curve if the animation is over, so don't touch | 149 // scrollBy() could delete this curve if the animation is over, so don't touch |
| 150 // any member variables after making that call. | 150 // any member variables after making that call. |
| 151 bool did_scroll = target->ScrollBy(blink::WebFloatSize(delta), | 151 bool did_scroll = target->ScrollBy(blink::WebFloatSize(delta), |
| 152 blink::WebFloatSize(velocity)); | 152 blink::WebFloatSize(velocity)); |
| 153 return did_scroll && still_active; | 153 return did_scroll && still_active; |
| 154 } | 154 } |
| 155 | 155 |
| 156 void WebGestureCurveImpl::ComputeTotalScrollOffset(gfx::Vector2dF& offset) { |
| 157 curve_->ComputeTotalScrollOffset(offset); |
| 158 } |
| 159 |
| 160 bool WebGestureCurveImpl::ResetCurveBySnappedOffset( |
| 161 const gfx::Vector2dF& offset) { |
| 162 return curve_->ResetCurveBySnappedOffset(offset); |
| 163 } |
| 164 |
| 156 } // namespace ui | 165 } // namespace ui |
| OLD | NEW |