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

Unified Diff: mojo/services/html_viewer/blink_platform_impl.cc

Issue 1051593003: Refactors code for WebGestureCurve to ui/events/gestures/blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gn Created 5 years, 9 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
Index: mojo/services/html_viewer/blink_platform_impl.cc
diff --git a/mojo/services/html_viewer/blink_platform_impl.cc b/mojo/services/html_viewer/blink_platform_impl.cc
index 7a1ee7edfb451baaedf4166048d941463d8513bc..e2d6ca65cefa9c5b7587c50a3eb5ce576c7b822d 100644
--- a/mojo/services/html_viewer/blink_platform_impl.cc
+++ b/mojo/services/html_viewer/blink_platform_impl.cc
@@ -19,6 +19,7 @@
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "third_party/WebKit/public/platform/WebWaitableEvent.h"
+#include "ui/events/gestures/blink/web_gesture_curve_impl.h"
namespace html_viewer {
namespace {
@@ -257,6 +258,17 @@ blink::WebWaitableEvent* BlinkPlatformImpl::waitMultipleEvents(
return web_events[idx];
}
+blink::WebGestureCurve* BlinkPlatformImpl::createFlingAnimationCurve(
+ blink::WebGestureDevice device_source,
+ const blink::WebFloatPoint& velocity,
+ const blink::WebSize& cumulative_scroll) {
+ const bool is_main_thread = true;
+ return ui::WebGestureCurveImpl::CreateFromDefaultPlatformCurve(
+ gfx::Vector2dF(velocity.x, velocity.y),
+ gfx::Vector2dF(cumulative_scroll.width, cumulative_scroll.height),
+ is_main_thread).release();
+}
+
// static
void BlinkPlatformImpl::DestroyCurrentThread(void* thread) {
WebThreadImplForMessageLoop* impl =

Powered by Google App Engine
This is Rietveld 408576698