| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 std::pair<ui::LatencyComponentType, int64_t>* out); | 89 std::pair<ui::LatencyComponentType, int64_t>* out); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 template <> | 92 template <> |
| 93 struct StructTraits<ui::mojom::LatencyInfoDataView, ui::LatencyInfo> { | 93 struct StructTraits<ui::mojom::LatencyInfoDataView, ui::LatencyInfo> { |
| 94 static const std::string& trace_name(const ui::LatencyInfo& info); | 94 static const std::string& trace_name(const ui::LatencyInfo& info); |
| 95 static const ui::LatencyInfo::LatencyMap& latency_components( | 95 static const ui::LatencyInfo::LatencyMap& latency_components( |
| 96 const ui::LatencyInfo& info); | 96 const ui::LatencyInfo& info); |
| 97 static int64_t trace_id(const ui::LatencyInfo& info); | 97 static int64_t trace_id(const ui::LatencyInfo& info); |
| 98 static bool coalesced(const ui::LatencyInfo& info); | 98 static bool coalesced(const ui::LatencyInfo& info); |
| 99 static bool began(const ui::LatencyInfo& info); |
| 99 static bool terminated(const ui::LatencyInfo& info); | 100 static bool terminated(const ui::LatencyInfo& info); |
| 100 static ui::mojom::SourceEventType source_event_type( | 101 static ui::mojom::SourceEventType source_event_type( |
| 101 const ui::LatencyInfo& info); | 102 const ui::LatencyInfo& info); |
| 102 static bool Read(ui::mojom::LatencyInfoDataView data, ui::LatencyInfo* out); | 103 static bool Read(ui::mojom::LatencyInfoDataView data, ui::LatencyInfo* out); |
| 103 }; | 104 }; |
| 104 | 105 |
| 105 } // namespace mojo | 106 } // namespace mojo |
| 106 | 107 |
| 107 #endif // UI_LATENCY_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ | 108 #endif // UI_LATENCY_MOJO_LATENCY_INFO_STRUCT_TRAITS_H_ |
| OLD | NEW |