| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_LATENCY_INFO_H_ | 5 #ifndef UI_LATENCY_LATENCY_INFO_H_ |
| 6 #define UI_EVENTS_LATENCY_INFO_H_ | 6 #define UI_LATENCY_LATENCY_INFO_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <utility> | 12 #include <utility> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/containers/small_map.h" | 15 #include "base/containers/small_map.h" |
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "ui/events/events_base_export.h" | |
| 18 #include "ui/gfx/geometry/point_f.h" | 17 #include "ui/gfx/geometry/point_f.h" |
| 19 | 18 |
| 20 #if !defined(OS_IOS) | 19 #if !defined(OS_IOS) |
| 21 #include "ipc/ipc_param_traits.h" // nogncheck | 20 #include "ipc/ipc_param_traits.h" // nogncheck |
| 22 #include "mojo/public/cpp/bindings/struct_traits.h" // nogncheck | 21 #include "mojo/public/cpp/bindings/struct_traits.h" // nogncheck |
| 23 #endif | 22 #endif |
| 24 | 23 |
| 25 namespace base { | 24 namespace base { |
| 26 namespace trace_event { | 25 namespace trace_event { |
| 27 class ConvertableToTraceFormat; | 26 class ConvertableToTraceFormat; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 }; | 105 }; |
| 107 | 106 |
| 108 enum SourceEventType { | 107 enum SourceEventType { |
| 109 UNKNOWN, | 108 UNKNOWN, |
| 110 WHEEL, | 109 WHEEL, |
| 111 TOUCH, | 110 TOUCH, |
| 112 OTHER, | 111 OTHER, |
| 113 SOURCE_EVENT_TYPE_LAST = OTHER, | 112 SOURCE_EVENT_TYPE_LAST = OTHER, |
| 114 }; | 113 }; |
| 115 | 114 |
| 116 class EVENTS_BASE_EXPORT LatencyInfo { | 115 class LatencyInfo { |
| 117 public: | 116 public: |
| 118 struct LatencyComponent { | 117 struct LatencyComponent { |
| 119 // Nondecreasing number that can be used to determine what events happened | 118 // Nondecreasing number that can be used to determine what events happened |
| 120 // in the component at the time this struct was sent on to the next | 119 // in the component at the time this struct was sent on to the next |
| 121 // component. | 120 // component. |
| 122 int64_t sequence_number; | 121 int64_t sequence_number; |
| 123 // Average time of events that happened in this component. | 122 // Average time of events that happened in this component. |
| 124 base::TimeTicks event_time; | 123 base::TimeTicks event_time; |
| 125 // Count of events that happened in this component | 124 // Count of events that happened in this component |
| 126 uint32_t event_count; | 125 uint32_t event_count; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 251 |
| 253 #if !defined(OS_IOS) | 252 #if !defined(OS_IOS) |
| 254 friend struct IPC::ParamTraits<ui::LatencyInfo>; | 253 friend struct IPC::ParamTraits<ui::LatencyInfo>; |
| 255 friend struct mojo::StructTraits<ui::mojom::LatencyInfoDataView, | 254 friend struct mojo::StructTraits<ui::mojom::LatencyInfoDataView, |
| 256 ui::LatencyInfo>; | 255 ui::LatencyInfo>; |
| 257 #endif | 256 #endif |
| 258 }; | 257 }; |
| 259 | 258 |
| 260 } // namespace ui | 259 } // namespace ui |
| 261 | 260 |
| 262 #endif // UI_EVENTS_LATENCY_INFO_H_ | 261 #endif // UI_LATENCY_LATENCY_INFO_H_ |
| OLD | NEW |