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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/child/webkitplatformsupport_child_impl.h" 5 #include "webkit/child/webkitplatformsupport_child_impl.h"
6 6
7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
8 #include "webkit/child/fling_curve_configuration.h"
9
10 #if defined(OS_ANDROID)
11 #include "webkit/child/fling_animator_impl_android.h"
12 #endif
13
7 namespace webkit_glue { 14 namespace webkit_glue {
8 15
9 WebKitPlatformSupportChildImpl::WebKitPlatformSupportChildImpl() { 16 WebKitPlatformSupportChildImpl::WebKitPlatformSupportChildImpl()
17 : fling_curve_configuration_(new FlingCurveConfiguration) {}
18
19 WebKitPlatformSupportChildImpl::~WebKitPlatformSupportChildImpl() {}
20
21 void WebKitPlatformSupportChildImpl::SetFlingCurveParameters(
22 const std::vector<float>& new_touchpad,
23 const std::vector<float>& new_touchscreen) {
24 fling_curve_configuration_->SetCurveParameters(new_touchpad, new_touchscreen);
10 } 25 }
11 26
12 WebKitPlatformSupportChildImpl::~WebKitPlatformSupportChildImpl() { 27 WebKit::WebGestureCurve*
28 WebKitPlatformSupportChildImpl::createFlingAnimationCurve(
29 int device_source,
30 const WebKit::WebFloatPoint& velocity,
31 const WebKit::WebSize& cumulative_scroll) {
32 #if defined(OS_ANDROID)
33 return FlingAnimatorImpl::CreateAndroidGestureCurve(velocity,
34 cumulative_scroll);
35 #endif
36
37 if (device_source == WebKit::WebGestureEvent::Touchscreen)
38 return fling_curve_configuration_->CreateForTouchScreen(velocity,
39 cumulative_scroll);
40
41 return fling_curve_configuration_->CreateForTouchPad(velocity,
42 cumulative_scroll);
13 } 43 }
14 44
15 } // namespace webkit_glue 45 } // namespace webkit_glue
OLDNEW
« 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