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