| Index: content/common/input/event_with_latency_info.cc
|
| diff --git a/content/common/input/event_with_latency_info.cc b/content/common/input/event_with_latency_info.cc
|
| index 79084e5aa128bc67706f566581f503bb56748337..d4ea6731bc9e04f671cf0dc6b32c1762ac0d4f5b 100644
|
| --- a/content/common/input/event_with_latency_info.cc
|
| +++ b/content/common/input/event_with_latency_info.cc
|
| @@ -11,7 +11,8 @@ namespace content {
|
| ScopedWebInputEventWithLatencyInfo::ScopedWebInputEventWithLatencyInfo(
|
| blink::WebScopedInputEvent event,
|
| const ui::LatencyInfo& latency_info)
|
| - : event_(std::move(event)), latency_(latency_info) {}
|
| + : event_(new blink::WebCoalescedInputEvent(std::move(event))),
|
| + latency_(latency_info) {}
|
|
|
| ScopedWebInputEventWithLatencyInfo::~ScopedWebInputEventWithLatencyInfo() {}
|
|
|
| @@ -29,8 +30,9 @@ void ScopedWebInputEventWithLatencyInfo::CoalesceWith(
|
| // New events get coalesced into older events, and the newer timestamp
|
| // should always be preserved.
|
| const double time_stamp_seconds = other.event().timeStampSeconds();
|
| - ui::Coalesce(other.event(), event_.get());
|
| - event_->setTimeStampSeconds(time_stamp_seconds);
|
| + ui::Coalesce(other.event(), event_->eventPointer());
|
| + event_->eventPointer()->setTimeStampSeconds(time_stamp_seconds);
|
| + event_->addCoalescedEvent(other.event());
|
|
|
| // When coalescing two input events, we keep the oldest LatencyInfo
|
| // since it will represent the longest latency.
|
| @@ -39,10 +41,15 @@ void ScopedWebInputEventWithLatencyInfo::CoalesceWith(
|
| }
|
|
|
| const blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() const {
|
| - return *event_;
|
| + return event_->event();
|
| }
|
|
|
| blink::WebInputEvent& ScopedWebInputEventWithLatencyInfo::event() {
|
| + return *event_->eventPointer();
|
| +}
|
| +
|
| +const blink::WebCoalescedInputEvent&
|
| +ScopedWebInputEventWithLatencyInfo::coalesced_event() const {
|
| return *event_;
|
| }
|
|
|
|
|