Index: ui/events/blink/event_with_callback.cc |
diff --git a/ui/events/blink/event_with_callback.cc b/ui/events/blink/event_with_callback.cc |
index bcbd862ec5208e8ef3c4b3ad7b7d01c1575c8f9c..fff765c6c5ea20f1508d3a32b6d6683bde434d1b 100644 |
--- a/ui/events/blink/event_with_callback.cc |
+++ b/ui/events/blink/event_with_callback.cc |
@@ -26,6 +26,20 @@ EventWithCallback::EventWithCallback( |
original_events_.emplace_back(std::move(event), callback); |
} |
+EventWithCallback::EventWithCallback( |
+ ScopedWebInputEvent event, |
+ const LatencyInfo& latency, |
+ base::TimeTicks creation_timestamp, |
+ base::TimeTicks last_coalesced_timestamp, |
+ std::unique_ptr<OriginalEventList> original_events) |
+ : event_(std::move(event)), |
+ latency_(latency), |
+ creation_timestamp_(creation_timestamp), |
+ last_coalesced_timestamp_(last_coalesced_timestamp) { |
+ if (original_events) |
+ original_events_.splice(original_events_.end(), *original_events); |
+} |
+ |
EventWithCallback::~EventWithCallback() {} |
bool EventWithCallback::CanCoalesceWith(const EventWithCallback& other) const { |
@@ -69,6 +83,11 @@ void EventWithCallback::RunCallbacks( |
} |
} |
+const blink::WebGestureEvent& EventWithCallback::ToWebGestureEvent() const { |
+ DCHECK(blink::WebInputEvent::isGestureEventType(event_->type)); |
+ return static_cast<const blink::WebGestureEvent&>(*event_); |
+} |
+ |
EventWithCallback::OriginalEventWithCallback::OriginalEventWithCallback( |
ScopedWebInputEvent event, |
const InputHandlerProxy::EventDispositionCallback& callback) |