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

Unified Diff: content/child/blink_platform_impl.cc

Issue 634373003: Consolidate content fling implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win build Created 6 years, 2 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 | « content/child/OWNERS ('k') | content/child/fling_animator_impl_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/blink_platform_impl.cc
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index 8a270e05fc9a472379c90c8ea5abbe8197e00dfd..541cb8f2957495e776fe94235bf84af3b45f66dc 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -33,8 +33,8 @@
#include "content/child/child_thread.h"
#include "content/child/content_child_helpers.h"
#include "content/child/geofencing/web_geofencing_provider_impl.h"
-#include "content/child/touch_fling_gesture_curve.h"
#include "content/child/web_discardable_memory_impl.h"
+#include "content/child/web_gesture_curve_impl.h"
#include "content/child/web_socket_stream_handle_impl.h"
#include "content/child/web_url_loader_impl.h"
#include "content/child/websocket_bridge.h"
@@ -47,16 +47,13 @@
#include "net/base/net_util.h"
#include "third_party/WebKit/public/platform/WebConvertableToTraceFormat.h"
#include "third_party/WebKit/public/platform/WebData.h"
+#include "third_party/WebKit/public/platform/WebFloatPoint.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/platform/WebWaitableEvent.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
#include "ui/base/layout.h"
-#if defined(OS_ANDROID)
-#include "content/child/fling_animator_impl_android.h"
-#endif
-
#if !defined(NO_TCMALLOC) && defined(USE_TCMALLOC) && !defined(OS_WIN)
#include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h"
#endif
@@ -1002,13 +999,10 @@ blink::WebGestureCurve* BlinkPlatformImpl::createFlingAnimationCurve(
blink::WebGestureDevice device_source,
const blink::WebFloatPoint& velocity,
const blink::WebSize& cumulative_scroll) {
-#if defined(OS_ANDROID)
- return FlingAnimatorImpl::CreateAndroidGestureCurve(
- velocity,
- cumulative_scroll);
-#endif
-
- return TouchFlingGestureCurve::Create(velocity, cumulative_scroll);
+ auto curve = WebGestureCurveImpl::CreateFromDefaultPlatformCurve(
+ gfx::Vector2dF(velocity.x, velocity.y),
+ gfx::Vector2dF(cumulative_scroll.width, cumulative_scroll.height));
+ return curve.release();
}
void BlinkPlatformImpl::didStartWorkerRunLoop(
« no previous file with comments | « content/child/OWNERS ('k') | content/child/fling_animator_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698