OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_EVENTS_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ | 5 #ifndef UI_EVENTS_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ |
6 #define UI_EVENTS_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ | 6 #define UI_EVENTS_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ |
7 | 7 |
8 #include "ui/events/latency_info.h" | 8 #include "ui/events/latency_info.h" |
9 #include "ui/events/mojo/latency_info.mojom-shared.h" | 9 #include "ui/events/mojo/latency_info.mojom-shared.h" |
10 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" | 10 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 template <> | 40 template <> |
41 struct StructTraits<ui::mojom::LatencyComponentDataView, | 41 struct StructTraits<ui::mojom::LatencyComponentDataView, |
42 ui::LatencyInfo::LatencyComponent> { | 42 ui::LatencyInfo::LatencyComponent> { |
43 static int64_t sequence_number( | 43 static int64_t sequence_number( |
44 const ui::LatencyInfo::LatencyComponent& component); | 44 const ui::LatencyInfo::LatencyComponent& component); |
45 static base::TimeTicks event_time( | 45 static base::TimeTicks event_time( |
46 const ui::LatencyInfo::LatencyComponent& component); | 46 const ui::LatencyInfo::LatencyComponent& component); |
47 static uint32_t event_count( | 47 static uint32_t event_count( |
48 const ui::LatencyInfo::LatencyComponent& component); | 48 const ui::LatencyInfo::LatencyComponent& component); |
| 49 static base::TimeTicks first_event_time( |
| 50 const ui::LatencyInfo::LatencyComponent& component); |
| 51 static base::TimeTicks last_event_time( |
| 52 const ui::LatencyInfo::LatencyComponent& component); |
49 static bool Read(ui::mojom::LatencyComponentDataView data, | 53 static bool Read(ui::mojom::LatencyComponentDataView data, |
50 ui::LatencyInfo::LatencyComponent* out); | 54 ui::LatencyInfo::LatencyComponent* out); |
51 }; | 55 }; |
52 | 56 |
53 template <> | 57 template <> |
54 struct StructTraits<ui::mojom::LatencyComponentPairDataView, | 58 struct StructTraits<ui::mojom::LatencyComponentPairDataView, |
55 ui::LatencyInfo::LatencyMap::value_type> { | 59 ui::LatencyInfo::LatencyMap::value_type> { |
56 static const std::pair<ui::LatencyComponentType, int64_t>& key( | 60 static const std::pair<ui::LatencyComponentType, int64_t>& key( |
57 const ui::LatencyInfo::LatencyMap::value_type& input) { | 61 const ui::LatencyInfo::LatencyMap::value_type& input) { |
58 return input.first; | 62 return input.first; |
(...skipping 26 matching lines...) Expand all Loading... |
85 static InputCoordinateArray input_coordinates(const ui::LatencyInfo& info); | 89 static InputCoordinateArray input_coordinates(const ui::LatencyInfo& info); |
86 static int64_t trace_id(const ui::LatencyInfo& info); | 90 static int64_t trace_id(const ui::LatencyInfo& info); |
87 static bool coalesced(const ui::LatencyInfo& info); | 91 static bool coalesced(const ui::LatencyInfo& info); |
88 static bool terminated(const ui::LatencyInfo& info); | 92 static bool terminated(const ui::LatencyInfo& info); |
89 static bool Read(ui::mojom::LatencyInfoDataView data, ui::LatencyInfo* out); | 93 static bool Read(ui::mojom::LatencyInfoDataView data, ui::LatencyInfo* out); |
90 }; | 94 }; |
91 | 95 |
92 } // namespace mojo | 96 } // namespace mojo |
93 | 97 |
94 #endif // UI_EVENTS_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ | 98 #endif // UI_EVENTS_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ |
OLD | NEW |