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

Unified Diff: ui/events/mojo/latency_info_struct_traits.cc

Issue 2768393002: Adding first_event_time and last_event_time to LatencyInfo mojom. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « ui/events/mojo/latency_info_struct_traits.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/mojo/latency_info_struct_traits.cc
diff --git a/ui/events/mojo/latency_info_struct_traits.cc b/ui/events/mojo/latency_info_struct_traits.cc
index d70e95768ed81b3cb850a6fb9691f22abcd0547a..32fc616a967aaae70a87bee42822e980cf8acefc 100644
--- a/ui/events/mojo/latency_info_struct_traits.cc
+++ b/ui/events/mojo/latency_info_struct_traits.cc
@@ -176,12 +176,30 @@ uint32_t StructTraits<ui::mojom::LatencyComponentDataView,
}
// static
+base::TimeTicks StructTraits<ui::mojom::LatencyComponentDataView,
+ ui::LatencyInfo::LatencyComponent>::
+ first_event_time(const ui::LatencyInfo::LatencyComponent& component) {
+ return component.first_event_time;
+}
+
+// static
+base::TimeTicks StructTraits<ui::mojom::LatencyComponentDataView,
+ ui::LatencyInfo::LatencyComponent>::
+ last_event_time(const ui::LatencyInfo::LatencyComponent& component) {
+ return component.last_event_time;
+}
+
+// static
bool StructTraits<ui::mojom::LatencyComponentDataView,
ui::LatencyInfo::LatencyComponent>::
Read(ui::mojom::LatencyComponentDataView data,
ui::LatencyInfo::LatencyComponent* out) {
if (!data.ReadEventTime(&out->event_time))
return false;
+ if (!data.ReadFirstEventTime(&out->first_event_time))
+ return false;
+ if (!data.ReadLastEventTime(&out->last_event_time))
+ return false;
out->sequence_number = data.sequence_number();
out->event_count = data.event_count();
return true;
« no previous file with comments | « ui/events/mojo/latency_info_struct_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698