| 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> |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 private: | 209 private: |
| 210 void AddLatencyNumberWithTimestampImpl(LatencyComponentType component, | 210 void AddLatencyNumberWithTimestampImpl(LatencyComponentType component, |
| 211 int64_t id, | 211 int64_t id, |
| 212 int64_t component_sequence_number, | 212 int64_t component_sequence_number, |
| 213 base::TimeTicks time, | 213 base::TimeTicks time, |
| 214 uint32_t event_count, | 214 uint32_t event_count, |
| 215 const char* trace_name_str); | 215 const char* trace_name_str); |
| 216 | 216 |
| 217 // Converts latencyinfo into format that can be dumped into trace buffer. | 217 // Converts latencyinfo into format that can be dumped into trace buffer. |
| 218 scoped_refptr<base::trace_event::ConvertableToTraceFormat> AsTraceableData(); | 218 scoped_ptr<base::trace_event::ConvertableToTraceFormat> AsTraceableData(); |
| 219 scoped_refptr<base::trace_event::ConvertableToTraceFormat> | 219 scoped_ptr<base::trace_event::ConvertableToTraceFormat> |
| 220 CoordinatesAsTraceableData(); | 220 CoordinatesAsTraceableData(); |
| 221 | 221 |
| 222 // Shown as part of the name of the trace event for this LatencyInfo. | 222 // Shown as part of the name of the trace event for this LatencyInfo. |
| 223 // String is empty if no tracing is enabled. | 223 // String is empty if no tracing is enabled. |
| 224 std::string trace_name_; | 224 std::string trace_name_; |
| 225 | 225 |
| 226 LatencyMap latency_components_; | 226 LatencyMap latency_components_; |
| 227 | 227 |
| 228 // These coordinates represent window coordinates of the original input event. | 228 // These coordinates represent window coordinates of the original input event. |
| 229 uint32_t input_coordinates_size_; | 229 uint32_t input_coordinates_size_; |
| 230 InputCoordinate input_coordinates_[kMaxInputCoordinates]; | 230 InputCoordinate input_coordinates_[kMaxInputCoordinates]; |
| 231 | 231 |
| 232 uint32_t coalesced_events_size_; | 232 uint32_t coalesced_events_size_; |
| 233 double timestamps_of_coalesced_events_[kMaxCoalescedEventTimestamps]; | 233 double timestamps_of_coalesced_events_[kMaxCoalescedEventTimestamps]; |
| 234 | 234 |
| 235 // The unique id for matching the ASYNC_BEGIN/END trace event. | 235 // The unique id for matching the ASYNC_BEGIN/END trace event. |
| 236 int64_t trace_id_; | 236 int64_t trace_id_; |
| 237 // Whether a terminal component has been added. | 237 // Whether a terminal component has been added. |
| 238 bool terminated_; | 238 bool terminated_; |
| 239 | 239 |
| 240 friend struct IPC::ParamTraits<ui::LatencyInfo>; | 240 friend struct IPC::ParamTraits<ui::LatencyInfo>; |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 } // namespace ui | 243 } // namespace ui |
| 244 | 244 |
| 245 #endif // UI_EVENTS_LATENCY_INFO_H_ | 245 #endif // UI_EVENTS_LATENCY_INFO_H_ |
| OLD | NEW |