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

Unified Diff: ui/events/blink/event_with_callback.h

Issue 2552853002: [Compositor event queue] Coalesce gesture scroll&pinch of the same sequence (Closed)
Patch Set: sadrul's comments, fix dependency 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
« no previous file with comments | « ui/events/blink/compositor_thread_event_queue.cc ('k') | ui/events/blink/event_with_callback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/blink/event_with_callback.h
diff --git a/ui/events/blink/event_with_callback.h b/ui/events/blink/event_with_callback.h
index c6fd612caf9d6085d252e47ed43a09e32d985498..14f6eee4f3b97f1a52d133a544763387427db500 100644
--- a/ui/events/blink/event_with_callback.h
+++ b/ui/events/blink/event_with_callback.h
@@ -18,11 +18,26 @@ class InputHandlerProxyEventQueueTest;
class EventWithCallback {
public:
+ struct OriginalEventWithCallback {
+ OriginalEventWithCallback(
+ ScopedWebInputEvent event,
+ const InputHandlerProxy::EventDispositionCallback& callback);
+ ~OriginalEventWithCallback();
+ ScopedWebInputEvent event_;
+ InputHandlerProxy::EventDispositionCallback callback_;
+ };
+ using OriginalEventList = std::list<OriginalEventWithCallback>;
+
EventWithCallback(
ScopedWebInputEvent event,
const LatencyInfo& latency,
base::TimeTicks timestamp_now,
const InputHandlerProxy::EventDispositionCallback& callback);
+ EventWithCallback(ScopedWebInputEvent event,
+ const LatencyInfo& latency,
+ base::TimeTicks creation_timestamp,
+ base::TimeTicks last_coalesced_timestamp,
+ std::unique_ptr<OriginalEventList> original_events);
~EventWithCallback();
bool CanCoalesceWith(const EventWithCallback& other) const WARN_UNUSED_RESULT;
@@ -39,23 +54,16 @@ class EventWithCallback {
return last_coalesced_timestamp_;
}
size_t coalesced_count() const { return original_events_.size(); }
+ OriginalEventList& original_events() { return original_events_; }
private:
friend class test::InputHandlerProxyEventQueueTest;
- struct OriginalEventWithCallback {
- OriginalEventWithCallback(
- ScopedWebInputEvent event,
- const InputHandlerProxy::EventDispositionCallback& callback);
- ~OriginalEventWithCallback();
- ScopedWebInputEvent event_;
- InputHandlerProxy::EventDispositionCallback callback_;
- };
void SetTickClockForTesting(std::unique_ptr<base::TickClock> tick_clock);
ScopedWebInputEvent event_;
LatencyInfo latency_;
- std::list<OriginalEventWithCallback> original_events_;
+ OriginalEventList original_events_;
base::TimeTicks creation_timestamp_;
base::TimeTicks last_coalesced_timestamp_;
« no previous file with comments | « ui/events/blink/compositor_thread_event_queue.cc ('k') | ui/events/blink/event_with_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698