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

Unified Diff: ui/events/blink/web_input_event_traits.cc

Issue 2317253005: SourceEventType added to LatencyInfo (Closed)
Patch Set: reviews addressed. Created 4 years, 3 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/web_input_event_traits.cc
diff --git a/ui/events/blink/web_input_event_traits.cc b/ui/events/blink/web_input_event_traits.cc
index 8bfe69cec873c2152b0975558a78380b9e8d76f1..6525a32b7ac91dba4879392e05607e3a8f3105a1 100644
--- a/ui/events/blink/web_input_event_traits.cc
+++ b/ui/events/blink/web_input_event_traits.cc
@@ -252,4 +252,18 @@ uint32_t WebInputEventTraits::GetUniqueTouchEventId(
return 0U;
}
+// static
+LatencyInfo WebInputEventTraits::CreateLatencyInfoForWebGestureEvent(
+ WebGestureEvent event) {
+ SourceEventType source_event_type = SourceEventType::UNKOWN;
+ if (event.sourceDevice == blink::WebGestureDevice::WebGestureDeviceTouchpad)
+ source_event_type = SourceEventType::WHEEL;
+ else if (event.sourceDevice ==
+ blink::WebGestureDevice::WebGestureDeviceTouchscreen) {
+ source_event_type = SourceEventType::TOUCH;
+ }
+ LatencyInfo latency_info(source_event_type);
+ return latency_info;
+}
+
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698