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

Unified Diff: content/port/browser/event_with_latency_info.h

Issue 26923002: Consolidate WebInputEvent coalescing logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 2 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
« no previous file with comments | « content/common/input/web_input_event_traits.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/port/browser/event_with_latency_info.h
diff --git a/content/port/browser/event_with_latency_info.h b/content/port/browser/event_with_latency_info.h
index a39ae52076d08fa6a894d84c0625a63303d6a4d0..c8d941f6df2a220eabe72cf43b880cac454daa1c 100644
--- a/content/port/browser/event_with_latency_info.h
+++ b/content/port/browser/event_with_latency_info.h
@@ -7,6 +7,8 @@
#include "ui/events/latency_info.h"
+#include "content/common/input/web_input_event_traits.h"
+
namespace WebKit {
class WebGestureEvent;
class WebMouseEvent;
@@ -26,6 +28,16 @@ class EventWithLatencyInfo {
: event(e), latency(l) {}
EventWithLatencyInfo() {}
+
+ bool CanCoalesceWith(const EventWithLatencyInfo& other)
+ const WARN_UNUSED_RESULT {
+ return WebInputEventTraits::CanCoalesce(other.event, event);
+ }
+
+ void CoalesceWith(const EventWithLatencyInfo& other) {
+ WebInputEventTraits::Coalesce(other.event, &event);
+ latency.MergeWith(other.latency);
+ }
};
typedef EventWithLatencyInfo<WebKit::WebGestureEvent>
« no previous file with comments | « content/common/input/web_input_event_traits.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698