Chromium Code Reviews| 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 <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/process/process_handle.h" | |
|
jbauman
2014/01/17 00:02:29
Not necessary anymore.
| |
| 13 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 14 #include "ui/events/events_base_export.h" | 15 #include "ui/events/events_base_export.h" |
| 15 | 16 |
| 16 namespace ui { | 17 namespace ui { |
| 17 | 18 |
| 18 enum LatencyComponentType { | 19 enum LatencyComponentType { |
| 19 // ---------------------------BEGIN COMPONENT------------------------------- | 20 // ---------------------------BEGIN COMPONENT------------------------------- |
| 20 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing. | 21 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing. |
| 21 // Timestamp when the input event is sent from RenderWidgetHost to renderer. | 22 // Timestamp when the input event is sent from RenderWidgetHost to renderer. |
| 22 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 23 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 int64 id, | 128 int64 id, |
| 128 LatencyComponent* output) const; | 129 LatencyComponent* output) const; |
| 129 | 130 |
| 130 void RemoveLatency(LatencyComponentType type); | 131 void RemoveLatency(LatencyComponentType type); |
| 131 | 132 |
| 132 void Clear(); | 133 void Clear(); |
| 133 | 134 |
| 134 // Records the |event_type| in trace buffer as TRACE_EVENT_ASYNC_STEP. | 135 // Records the |event_type| in trace buffer as TRACE_EVENT_ASYNC_STEP. |
| 135 void TraceEventType(const char* event_type); | 136 void TraceEventType(const char* event_type); |
| 136 | 137 |
| 138 // Some LatencyComponents generated in the renderer, specifically | |
| 139 // WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENTs, require a ProcessId to route | |
|
jbauman
2014/01/17 00:02:29
Not a ProcessId anymore.
| |
| 140 // notifications correctly. Since that cannot be given in the renderer | |
| 141 // this function patches the ProcessId in from the browser process. | |
| 142 void FixMissingComponentIds(int64 component_id); | |
|
jbauman
2014/01/17 00:02:29
Could you put this on RenderWidgetHostImpl instead
| |
| 143 | |
| 137 LatencyMap latency_components; | 144 LatencyMap latency_components; |
| 138 // The unique id for matching the ASYNC_BEGIN/END trace event. | 145 // The unique id for matching the ASYNC_BEGIN/END trace event. |
| 139 int64 trace_id; | 146 int64 trace_id; |
| 140 // Whether a terminal component has been added. | 147 // Whether a terminal component has been added. |
| 141 bool terminated; | 148 bool terminated; |
| 142 }; | 149 }; |
| 143 | 150 |
| 144 } // namespace ui | 151 } // namespace ui |
| 145 | 152 |
| 146 #endif // UI_EVENTS_LATENCY_INFO_H_ | 153 #endif // UI_EVENTS_LATENCY_INFO_H_ |
| OLD | NEW |