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 "content/child/fling_animator_impl_android.h" | 5 #include "content/child/fling_animator_impl_android.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "third_party/WebKit/public/platform/WebFloatSize.h" | 8 #include "third_party/WebKit/public/platform/WebFloatSize.h" |
9 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h" | 9 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h" |
10 #include "ui/gfx/frame_time.h" | 10 #include "ui/gfx/frame_time.h" |
11 #include "ui/gfx/vector2d.h" | 11 #include "ui/gfx/geometry/vector2d.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 // Value taken directly from Android's ViewConfiguration. As the value has not | 17 // Value taken directly from Android's ViewConfiguration. As the value has not |
18 // changed in 4+ years, and does not depend on any device-specific configuration | 18 // changed in 4+ years, and does not depend on any device-specific configuration |
19 // parameters, copy it directly to avoid potential JNI interop issues in the | 19 // parameters, copy it directly to avoid potential JNI interop issues in the |
20 // render process (see crbug.com/362614). | 20 // render process (see crbug.com/362614). |
21 const float kDefaultAndroidPlatformScrollFriction = 0.015f; | 21 const float kDefaultAndroidPlatformScrollFriction = 0.015f; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 FlingAnimatorImpl* FlingAnimatorImpl::CreateAndroidGestureCurve( | 93 FlingAnimatorImpl* FlingAnimatorImpl::CreateAndroidGestureCurve( |
94 const blink::WebFloatPoint& velocity, | 94 const blink::WebFloatPoint& velocity, |
95 const blink::WebSize&) { | 95 const blink::WebSize&) { |
96 FlingAnimatorImpl* gesture_curve = new FlingAnimatorImpl(); | 96 FlingAnimatorImpl* gesture_curve = new FlingAnimatorImpl(); |
97 gesture_curve->StartFling(velocity); | 97 gesture_curve->StartFling(velocity); |
98 return gesture_curve; | 98 return gesture_curve; |
99 } | 99 } |
100 | 100 |
101 } // namespace content | 101 } // namespace content |
OLD | NEW |