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

Unified Diff: third_party/WebKit/Source/web/WebInputEventConversion.cpp

Issue 2510133002: Add getCoalescedEvents API to PointerEvent (Closed)
Patch Set: rebase Created 4 years, 1 month 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: third_party/WebKit/Source/web/WebInputEventConversion.cpp
diff --git a/third_party/WebKit/Source/web/WebInputEventConversion.cpp b/third_party/WebKit/Source/web/WebInputEventConversion.cpp
index 46bbd56335f43d131dcd5d48afc2bfef2d8d0207..a8b015cabea6fbab3107ecf56c4e7dea3ef8bfea 100644
--- a/third_party/WebKit/Source/web/WebInputEventConversion.cpp
+++ b/third_party/WebKit/Source/web/WebInputEventConversion.cpp
@@ -828,4 +828,28 @@ WebGestureEventBuilder::WebGestureEventBuilder(const LayoutItem layoutItem,
}
}
+Vector<PlatformMouseEvent> createPlatformMouseEventVector(
+ Widget* widget,
+ const std::vector<const WebInputEvent*>& coalescedEvents) {
+ Vector<PlatformMouseEvent> result;
+ for (const auto& event : coalescedEvents) {
+ DCHECK(WebInputEvent::isMouseEventType(event->type));
+ result.append(PlatformMouseEventBuilder(
+ widget, static_cast<const WebMouseEvent&>(*event)));
+ }
+ return result;
+}
+
+Vector<PlatformTouchEvent> createPlatformTouchEventVector(
+ Widget* widget,
+ const std::vector<const WebInputEvent*>& coalescedEvents) {
+ Vector<PlatformTouchEvent> result;
+ for (const auto& event : coalescedEvents) {
+ DCHECK(WebInputEvent::isTouchEventType(event->type));
+ result.append(PlatformTouchEventBuilder(
+ widget, static_cast<const WebTouchEvent&>(*event)));
+ }
+ return result;
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/WebInputEventConversion.h ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698