| 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_EVENTS_LATENCY_INFO_H_ |
| 6 #define UI_EVENTS_LATENCY_INFO_H_ | 6 #define UI_EVENTS_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 "base/trace_event/trace_event.h" | 17 #include "base/trace_event/trace_event.h" |
| 18 #include "ui/events/events_base_export.h" | 18 #include "ui/events/events_base_export.h" |
| 19 #include "ui/gfx/geometry/point_f.h" | 19 #include "ui/gfx/geometry/point_f.h" |
| 20 | 20 |
| 21 #if !defined(OS_IOS) | 21 #if !defined(OS_IOS) |
| 22 #include "ipc/ipc_param_traits.h" // nogncheck | 22 #include "ipc/ipc_param_traits.h" // nogncheck |
| 23 #include "mojo/public/cpp/bindings/struct_traits.h" // nogncheck | 23 #include "mojo/public/cpp/bindings/struct_traits.h" // nogncheck |
| 24 #endif | 24 #endif |
| 25 | 25 |
| 26 namespace ui { | 26 namespace ui { |
| 27 | 27 |
| 28 #if !defined(OS_IOS) | 28 #if !defined(OS_IOS) |
| 29 namespace mojom { | 29 namespace mojom { |
| 30 class LatencyInfo; | 30 class LatencyInfoDataView; |
| 31 } | 31 } |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 // When adding new components, or new metrics based on LatencyInfo, | 34 // When adding new components, or new metrics based on LatencyInfo, |
| 35 // please update latency_info.dot. | 35 // please update latency_info.dot. |
| 36 enum LatencyComponentType { | 36 enum LatencyComponentType { |
| 37 // ---------------------------BEGIN COMPONENT------------------------------- | 37 // ---------------------------BEGIN COMPONENT------------------------------- |
| 38 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing. | 38 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing. |
| 39 // Timestamp when the input event is sent from RenderWidgetHost to renderer. | 39 // Timestamp when the input event is sent from RenderWidgetHost to renderer. |
| 40 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 40 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 231 |
| 232 // The unique id for matching the ASYNC_BEGIN/END trace event. | 232 // The unique id for matching the ASYNC_BEGIN/END trace event. |
| 233 int64_t trace_id_; | 233 int64_t trace_id_; |
| 234 // Whether this event has been coalesced into another event. | 234 // Whether this event has been coalesced into another event. |
| 235 bool coalesced_; | 235 bool coalesced_; |
| 236 // Whether a terminal component has been added. | 236 // Whether a terminal component has been added. |
| 237 bool terminated_; | 237 bool terminated_; |
| 238 | 238 |
| 239 #if !defined(OS_IOS) | 239 #if !defined(OS_IOS) |
| 240 friend struct IPC::ParamTraits<ui::LatencyInfo>; | 240 friend struct IPC::ParamTraits<ui::LatencyInfo>; |
| 241 friend struct mojo::StructTraits<ui::mojom::LatencyInfo, ui::LatencyInfo>; | 241 friend struct mojo::StructTraits<ui::mojom::LatencyInfoDataView, |
| 242 ui::LatencyInfo>; |
| 242 #endif | 243 #endif |
| 243 }; | 244 }; |
| 244 | 245 |
| 245 } // namespace ui | 246 } // namespace ui |
| 246 | 247 |
| 247 #endif // UI_EVENTS_LATENCY_INFO_H_ | 248 #endif // UI_EVENTS_LATENCY_INFO_H_ |
| OLD | NEW |