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

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: Fix mouse up event sender not modifying modifiers Created 4 years 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 750b15d23390023da338ae7ec872129a8e5b9f7e..789c88831d6fb15b531e60737975a071a18b4f0f 100644
--- a/content/common/input/event_with_latency_info.h
+++ b/content/common/input/event_with_latency_info.h
@@ -48,6 +48,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)
@@ -70,7 +76,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