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 "webkit/glue/fling_animator_impl_android.h" | 5 #include "webkit/glue/fling_animator_impl_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "jni/OverScroller_jni.h" | 10 #include "jni/OverScroller_jni.h" |
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatSize.h" | 11 #include "third_party/WebKit/public/platform/WebFloatSize.h" |
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebGestureCurveTarg
et.h" | 12 #include "third_party/WebKit/public/platform/WebGestureCurveTarget.h" |
13 #include "ui/gfx/screen.h" | 13 #include "ui/gfx/screen.h" |
14 #include "ui/gfx/vector2d.h" | 14 #include "ui/gfx/vector2d.h" |
15 | 15 |
16 namespace webkit_glue { | 16 namespace webkit_glue { |
17 | 17 |
18 namespace { | 18 namespace { |
19 static const float kEpsilon = 1e-4; | 19 static const float kEpsilon = 1e-4; |
20 } | 20 } |
21 | 21 |
22 FlingAnimatorImpl::FlingAnimatorImpl() | 22 FlingAnimatorImpl::FlingAnimatorImpl() |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 FlingAnimatorImpl* FlingAnimatorImpl::CreateAndroidGestureCurve( | 140 FlingAnimatorImpl* FlingAnimatorImpl::CreateAndroidGestureCurve( |
141 const WebKit::WebFloatPoint& velocity, | 141 const WebKit::WebFloatPoint& velocity, |
142 const WebKit::WebSize&) { | 142 const WebKit::WebSize&) { |
143 FlingAnimatorImpl* gesture_curve = new FlingAnimatorImpl(); | 143 FlingAnimatorImpl* gesture_curve = new FlingAnimatorImpl(); |
144 gesture_curve->StartFling(velocity); | 144 gesture_curve->StartFling(velocity); |
145 return gesture_curve; | 145 return gesture_curve; |
146 } | 146 } |
147 | 147 |
148 } // namespace webkit_glue | 148 } // namespace webkit_glue |
OLD | NEW |