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

Unified Diff: ui/events/latency_info.h

Issue 2317253005: SourceEventType added to LatencyInfo (Closed)
Patch Set: Changed the patch to only contain source event type plumbing. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/latency_info.h
diff --git a/ui/events/latency_info.h b/ui/events/latency_info.h
index c7e69b783fa42b3fb9674d961945b918f4a4705c..f9696f19f559f030125e472c8233fcaa2375e226 100644
--- a/ui/events/latency_info.h
+++ b/ui/events/latency_info.h
@@ -118,6 +118,14 @@ enum LatencyComponentType {
INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT,
};
+enum SourceEventType {
+ UNKOWN,
+ WHEEL,
+ TOUCH,
+ OTHER,
+ SOURCE_EVENT_TYPE_LAST = OTHER,
+};
+
class EVENTS_BASE_EXPORT LatencyInfo {
public:
struct LatencyComponent {
@@ -144,6 +152,7 @@ class EVENTS_BASE_EXPORT LatencyInfo {
LatencyInfo();
LatencyInfo(const LatencyInfo& other);
+ LatencyInfo(SourceEventType type);
~LatencyInfo();
// For test only.
@@ -205,6 +214,13 @@ class EVENTS_BASE_EXPORT LatencyInfo {
const LatencyMap& latency_components() const { return latency_components_; }
+ const SourceEventType& source_event_type() const {
+ return source_event_type_;
+ }
+ void set_source_event_type(SourceEventType type) {
+ source_event_type_ = type;
+ }
+
bool terminated() const { return terminated_; }
void set_coalesced() { coalesced_ = true; }
bool coalesced() const { return coalesced_; }
@@ -241,6 +257,8 @@ class EVENTS_BASE_EXPORT LatencyInfo {
// Whether a terminal component has been added.
bool terminated_;
+ SourceEventType source_event_type_;
tdresser 2016/09/12 14:23:09 Add comment.
sahel 2016/09/12 17:02:26 Done.
+
#if !defined(OS_IOS)
friend struct IPC::ParamTraits<ui::LatencyInfo>;
friend struct mojo::StructTraits<ui::mojom::LatencyInfoDataView,

Powered by Google App Engine
This is Rietveld 408576698