Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1156)

Unified Diff: webkit/child/webkitplatformsupport_child_impl.cc

Issue 16424008: move webkit/glue/fling_* to webkit/child (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android 5 Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/child/webkitplatformsupport_child_impl.h ('k') | webkit/glue/fling_animator_impl_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/child/webkitplatformsupport_child_impl.cc
diff --git a/webkit/child/webkitplatformsupport_child_impl.cc b/webkit/child/webkitplatformsupport_child_impl.cc
index b9a06621e5b6fa0d3db797ca844233e1089f7242..456a5c90566e476f7ff986f653e47808041e9c0b 100644
--- a/webkit/child/webkitplatformsupport_child_impl.cc
+++ b/webkit/child/webkitplatformsupport_child_impl.cc
@@ -4,12 +4,42 @@
#include "webkit/child/webkitplatformsupport_child_impl.h"
+#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
+#include "webkit/child/fling_curve_configuration.h"
+
+#if defined(OS_ANDROID)
+#include "webkit/child/fling_animator_impl_android.h"
+#endif
+
namespace webkit_glue {
-WebKitPlatformSupportChildImpl::WebKitPlatformSupportChildImpl() {
+WebKitPlatformSupportChildImpl::WebKitPlatformSupportChildImpl()
+ : fling_curve_configuration_(new FlingCurveConfiguration) {}
+
+WebKitPlatformSupportChildImpl::~WebKitPlatformSupportChildImpl() {}
+
+void WebKitPlatformSupportChildImpl::SetFlingCurveParameters(
+ const std::vector<float>& new_touchpad,
+ const std::vector<float>& new_touchscreen) {
+ fling_curve_configuration_->SetCurveParameters(new_touchpad, new_touchscreen);
}
-WebKitPlatformSupportChildImpl::~WebKitPlatformSupportChildImpl() {
+WebKit::WebGestureCurve*
+WebKitPlatformSupportChildImpl::createFlingAnimationCurve(
+ int device_source,
+ const WebKit::WebFloatPoint& velocity,
+ const WebKit::WebSize& cumulative_scroll) {
+#if defined(OS_ANDROID)
+ return FlingAnimatorImpl::CreateAndroidGestureCurve(velocity,
+ cumulative_scroll);
+#endif
+
+ if (device_source == WebKit::WebGestureEvent::Touchscreen)
+ return fling_curve_configuration_->CreateForTouchScreen(velocity,
+ cumulative_scroll);
+
+ return fling_curve_configuration_->CreateForTouchPad(velocity,
+ cumulative_scroll);
}
} // namespace webkit_glue
« no previous file with comments | « webkit/child/webkitplatformsupport_child_impl.h ('k') | webkit/glue/fling_animator_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698