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 <string> | 10 #include <string> |
11 #include <utility> | 11 #include <utility> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/containers/small_map.h" | 14 #include "base/containers/small_map.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.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 "ipc/ipc_param_traits.h" | |
19 #include "ui/events/events_base_export.h" | 18 #include "ui/events/events_base_export.h" |
20 | 19 |
| 20 #if !defined(OS_IOS) |
| 21 #include "ipc/ipc_param_traits.h" // nogncheck |
| 22 #endif |
| 23 |
21 namespace ui { | 24 namespace ui { |
22 | 25 |
23 // When adding new components, or new metrics based on LatencyInfo, | 26 // When adding new components, or new metrics based on LatencyInfo, |
24 // please update latency_info.dot. | 27 // please update latency_info.dot. |
25 enum LatencyComponentType { | 28 enum LatencyComponentType { |
26 // ---------------------------BEGIN COMPONENT------------------------------- | 29 // ---------------------------BEGIN COMPONENT------------------------------- |
27 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing. | 30 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing. |
28 // Timestamp when the input event is sent from RenderWidgetHost to renderer. | 31 // Timestamp when the input event is sent from RenderWidgetHost to renderer. |
29 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 32 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
30 // In threaded scrolling, main thread scroll listener update is async to | 33 // In threaded scrolling, main thread scroll listener update is async to |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 uint32_t input_coordinates_size_; | 225 uint32_t input_coordinates_size_; |
223 InputCoordinate input_coordinates_[kMaxInputCoordinates]; | 226 InputCoordinate input_coordinates_[kMaxInputCoordinates]; |
224 | 227 |
225 // The unique id for matching the ASYNC_BEGIN/END trace event. | 228 // The unique id for matching the ASYNC_BEGIN/END trace event. |
226 int64_t trace_id_; | 229 int64_t trace_id_; |
227 // Whether this event has been coalesced into another event. | 230 // Whether this event has been coalesced into another event. |
228 bool coalesced_; | 231 bool coalesced_; |
229 // Whether a terminal component has been added. | 232 // Whether a terminal component has been added. |
230 bool terminated_; | 233 bool terminated_; |
231 | 234 |
| 235 #if !defined(OS_IOS) |
232 friend struct IPC::ParamTraits<ui::LatencyInfo>; | 236 friend struct IPC::ParamTraits<ui::LatencyInfo>; |
| 237 #endif |
233 }; | 238 }; |
234 | 239 |
235 } // namespace ui | 240 } // namespace ui |
236 | 241 |
237 #endif // UI_EVENTS_LATENCY_INFO_H_ | 242 #endif // UI_EVENTS_LATENCY_INFO_H_ |
OLD | NEW |