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

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

Issue 2756893002: Add Keyboard Latency UMA Metrics. (Closed)
Patch Set: Restrict to RawKeyDown and Char events on Android & Mac Created 3 years, 7 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
« no previous file with comments | « ui/events/event.cc ('k') | ui/latency/latency_tracker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_LATENCY_LATENCY_INFO_H_ 5 #ifndef UI_LATENCY_LATENCY_INFO_H_
6 #define UI_LATENCY_LATENCY_INFO_H_ 6 #define UI_LATENCY_LATENCY_INFO_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // but the swap failed. 102 // but the swap failed.
103 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT, 103 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT,
104 LATENCY_COMPONENT_TYPE_LAST = 104 LATENCY_COMPONENT_TYPE_LAST =
105 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT, 105 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT,
106 }; 106 };
107 107
108 enum SourceEventType { 108 enum SourceEventType {
109 UNKNOWN, 109 UNKNOWN,
110 WHEEL, 110 WHEEL,
111 TOUCH, 111 TOUCH,
112 KEY_PRESS,
112 OTHER, 113 OTHER,
113 SOURCE_EVENT_TYPE_LAST = OTHER, 114 SOURCE_EVENT_TYPE_LAST = OTHER,
114 }; 115 };
115 116
116 class LatencyInfo { 117 class LatencyInfo {
117 public: 118 public:
118 struct LatencyComponent { 119 struct LatencyComponent {
119 // Nondecreasing number that can be used to determine what events happened 120 // Nondecreasing number that can be used to determine what events happened
120 // in the component at the time this struct was sent on to the next 121 // in the component at the time this struct was sent on to the next
121 // component. 122 // component.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 249
249 // This is declared here for use in gtest-based unit tests, but is defined in 250 // This is declared here for use in gtest-based unit tests, but is defined in
250 // //ui/latency:test_support target. 251 // //ui/latency:test_support target.
251 // Without this the default PrintTo template in gtest tries to pass LatencyInfo 252 // Without this the default PrintTo template in gtest tries to pass LatencyInfo
252 // by value, which leads to an alignment compile error on Windows. 253 // by value, which leads to an alignment compile error on Windows.
253 void PrintTo(const LatencyInfo& latency, ::std::ostream* os); 254 void PrintTo(const LatencyInfo& latency, ::std::ostream* os);
254 255
255 } // namespace ui 256 } // namespace ui
256 257
257 #endif // UI_LATENCY_LATENCY_INFO_H_ 258 #endif // UI_LATENCY_LATENCY_INFO_H_
OLDNEW
« no previous file with comments | « ui/events/event.cc ('k') | ui/latency/latency_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698