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

Unified Diff: ui/events/blink/blink_event_util.h

Issue 1034713004: Refactors gesture conversion functions to ui/events/blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix M_PI usage for windows 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: ui/events/blink/blink_event_util.h
diff --git a/ui/events/blink/blink_event_util.h b/ui/events/blink/blink_event_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..c0f60c921ec3b14103ba65d3d28075fb69cc3431
--- /dev/null
+++ b/ui/events/blink/blink_event_util.h
@@ -0,0 +1,44 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_
+#define UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_
+
+namespace base {
+class TimeDelta;
+}
+
+namespace blink {
+class WebGestureEvent;
+class WebTouchEvent;
+}
+
+namespace gfx {
+class PointF;
+}
+
+namespace ui {
+struct GestureEventData;
+struct GestureEventDetails;
+class MotionEvent;
+
+blink::WebTouchEvent CreateWebTouchEventFromMotionEvent(
+ const MotionEvent& event,
+ bool may_cause_scrolling);
+
+blink::WebGestureEvent CreateWebGestureEvent(const GestureEventDetails& details,
+ base::TimeDelta timestamp,
+ const gfx::PointF& location,
+ const gfx::PointF& raw_location,
+ int flags);
+
+// Convenience wrapper for |CreateWebGestureEvent| using the supplied |data|.
+blink::WebGestureEvent CreateWebGestureEventFromGestureEventData(
+ const GestureEventData& data);
+
+int EventFlagsToWebEventModifiers(int flags);
+
+} // namespace content
+
+#endif // UI_EVENTS_BLINK_BLINK_EVENT_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698