Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: ui/events/latency_info.h

Issue 2040733002: Implement LatencyInfo StructTraits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ArrayTraits for InputCoordinates Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 19
20 #if !defined(OS_IOS) 20 #if !defined(OS_IOS)
21 #include "ipc/ipc_param_traits.h" // nogncheck 21 #include "ipc/ipc_param_traits.h" // nogncheck
22 #include "mojo/public/cpp/bindings/struct_traits.h" // nogncheck
22 #endif 23 #endif
23 24
24 namespace ui { 25 namespace ui {
25 26
27 #if !defined(OS_IOS)
28 namespace mojom {
29 class LatencyInfo;
30 }
31 #endif
32
26 // When adding new components, or new metrics based on LatencyInfo, 33 // When adding new components, or new metrics based on LatencyInfo,
27 // please update latency_info.dot. 34 // please update latency_info.dot.
28 enum LatencyComponentType { 35 enum LatencyComponentType {
29 // ---------------------------BEGIN COMPONENT------------------------------- 36 // ---------------------------BEGIN COMPONENT-------------------------------
30 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing. 37 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing.
31 // Timestamp when the input event is sent from RenderWidgetHost to renderer. 38 // Timestamp when the input event is sent from RenderWidgetHost to renderer.
32 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, 39 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
33 // In threaded scrolling, main thread scroll listener update is async to 40 // In threaded scrolling, main thread scroll listener update is async to
34 // scroll processing in impl thread. This is the timestamp when we consider 41 // scroll processing in impl thread. This is the timestamp when we consider
35 // the main thread scroll listener update is begun. 42 // the main thread scroll listener update is begun.
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 240
234 // The unique id for matching the ASYNC_BEGIN/END trace event. 241 // The unique id for matching the ASYNC_BEGIN/END trace event.
235 int64_t trace_id_; 242 int64_t trace_id_;
236 // Whether this event has been coalesced into another event. 243 // Whether this event has been coalesced into another event.
237 bool coalesced_; 244 bool coalesced_;
238 // Whether a terminal component has been added. 245 // Whether a terminal component has been added.
239 bool terminated_; 246 bool terminated_;
240 247
241 #if !defined(OS_IOS) 248 #if !defined(OS_IOS)
242 friend struct IPC::ParamTraits<ui::LatencyInfo>; 249 friend struct IPC::ParamTraits<ui::LatencyInfo>;
250 friend struct mojo::StructTraits<ui::mojom::LatencyInfo, ui::LatencyInfo>;
243 #endif 251 #endif
244 }; 252 };
245 253
246 } // namespace ui 254 } // namespace ui
247 255
248 #endif // UI_EVENTS_LATENCY_INFO_H_ 256 #endif // UI_EVENTS_LATENCY_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698