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

Unified Diff: content/common/input/event_with_latency_info.h

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Rebase Created 3 years, 12 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: content/common/input/event_with_latency_info.h
diff --git a/content/common/input/event_with_latency_info.h b/content/common/input/event_with_latency_info.h
index e9c17ce713f71172d60dcac141e7a170754db263..9df498c0d5e73b817a19d90a649bff71eb32413b 100644
--- a/content/common/input/event_with_latency_info.h
+++ b/content/common/input/event_with_latency_info.h
@@ -49,6 +49,12 @@ class EventWithLatencyInfo {
EventWithLatencyInfo(const T& e, const ui::LatencyInfo& l)
: event(e), latency(l) {}
+ EventWithLatencyInfo(blink::WebInputEvent::Type type,
+ int modifiers,
+ double timeStampSeconds,
+ const ui::LatencyInfo& l)
+ : event(type, modifiers, timeStampSeconds), latency(l) {}
+
EventWithLatencyInfo() {}
bool CanCoalesceWith(const EventWithLatencyInfo& other)
@@ -71,7 +77,7 @@ class EventWithLatencyInfo {
// should always be preserved.
const double time_stamp_seconds = other.event.timeStampSeconds;
ui::Coalesce(other.event, &event);
- event.timeStampSeconds = time_stamp_seconds;
+ event.setTimeStampSeconds(time_stamp_seconds);
// When coalescing two input events, we keep the oldest LatencyInfo
// for Telemetry latency tests, since it will represent the longest

Powered by Google App Engine
This is Rietveld 408576698