| 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_LATENCY_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ | 5 #ifndef UI_LATENCY_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ |
| 6 #define UI_LATENCY_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ | 6 #define UI_LATENCY_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ |
| 7 | 7 |
| 8 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" | 8 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" |
| 9 #include "ui/latency/latency_info.h" | 9 #include "ui/latency/latency_info.h" |
| 10 #include "ui/latency/mojo/latency_info.mojom-shared.h" | 10 #include "ui/latency/mojo/latency_info.mojom-shared.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 static Element& GetValue(Iterator& iterator) { return *iterator; } | 42 static Element& GetValue(Iterator& iterator) { return *iterator; } |
| 43 | 43 |
| 44 static size_t GetSize(const ui::LatencyInfo::LatencyMap& input) { | 44 static size_t GetSize(const ui::LatencyInfo::LatencyMap& input) { |
| 45 return input.size(); | 45 return input.size(); |
| 46 } | 46 } |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 template <> | 49 template <> |
| 50 struct StructTraits<ui::mojom::LatencyComponentDataView, | 50 struct StructTraits<ui::mojom::LatencyComponentDataView, |
| 51 ui::LatencyInfo::LatencyComponent> { | 51 ui::LatencyInfo::LatencyComponent> { |
| 52 static int64_t sequence_number( | |
| 53 const ui::LatencyInfo::LatencyComponent& component); | |
| 54 static base::TimeTicks event_time( | 52 static base::TimeTicks event_time( |
| 55 const ui::LatencyInfo::LatencyComponent& component); | 53 const ui::LatencyInfo::LatencyComponent& component); |
| 56 static uint32_t event_count( | 54 static uint32_t event_count( |
| 57 const ui::LatencyInfo::LatencyComponent& component); | 55 const ui::LatencyInfo::LatencyComponent& component); |
| 58 static base::TimeTicks first_event_time( | 56 static base::TimeTicks first_event_time( |
| 59 const ui::LatencyInfo::LatencyComponent& component); | 57 const ui::LatencyInfo::LatencyComponent& component); |
| 60 static base::TimeTicks last_event_time( | 58 static base::TimeTicks last_event_time( |
| 61 const ui::LatencyInfo::LatencyComponent& component); | 59 const ui::LatencyInfo::LatencyComponent& component); |
| 62 static bool Read(ui::mojom::LatencyComponentDataView data, | 60 static bool Read(ui::mojom::LatencyComponentDataView data, |
| 63 ui::LatencyInfo::LatencyComponent* out); | 61 ui::LatencyInfo::LatencyComponent* out); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 static bool coalesced(const ui::LatencyInfo& info); | 96 static bool coalesced(const ui::LatencyInfo& info); |
| 99 static bool terminated(const ui::LatencyInfo& info); | 97 static bool terminated(const ui::LatencyInfo& info); |
| 100 static ui::mojom::SourceEventType source_event_type( | 98 static ui::mojom::SourceEventType source_event_type( |
| 101 const ui::LatencyInfo& info); | 99 const ui::LatencyInfo& info); |
| 102 static bool Read(ui::mojom::LatencyInfoDataView data, ui::LatencyInfo* out); | 100 static bool Read(ui::mojom::LatencyInfoDataView data, ui::LatencyInfo* out); |
| 103 }; | 101 }; |
| 104 | 102 |
| 105 } // namespace mojo | 103 } // namespace mojo |
| 106 | 104 |
| 107 #endif // UI_LATENCY_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ | 105 #endif // UI_LATENCY_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ |
| OLD | NEW |