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

Unified Diff: content/renderer/input/input_event_filter_unittest.cc

Issue 2265393002: Refactor compositor event handling path to be callback-based (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: creis's review, rebase Created 4 years, 3 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/renderer/input/input_event_filter.cc ('k') | content/renderer/input/input_handler_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/input/input_event_filter_unittest.cc
diff --git a/content/renderer/input/input_event_filter_unittest.cc b/content/renderer/input/input_event_filter_unittest.cc
index 996488e958cc0ba4a4bf7a145cf6d1206548cb2b..51109e7a4c6e8da0f3d054f158262d7bda01bc0e 100644
--- a/content/renderer/input/input_event_filter_unittest.cc
+++ b/content/renderer/input/input_event_filter_unittest.cc
@@ -60,20 +60,26 @@ class InputEventRecorder : public content::InputHandlerManager {
records_.clear();
}
- InputEventAckState HandleInputEvent(int routing_id,
- const WebInputEvent* event,
- ui::LatencyInfo* latency_info) override {
+ void HandleInputEvent(int routing_id,
+ ui::ScopedWebInputEvent event,
+ const ui::LatencyInfo& latency_info,
+ const InputHandlerManager::InputEventAckStateCallback&
+ callback) override {
DCHECK_EQ(kTestRoutingID, routing_id);
- records_.push_back(Record(event));
+ records_.push_back(Record(event.get()));
if (handle_events_) {
- return INPUT_EVENT_ACK_STATE_CONSUMED;
+ callback.Run(INPUT_EVENT_ACK_STATE_CONSUMED, std::move(event),
+ latency_info, nullptr);
} else if (send_to_widget_) {
if (passive_)
- return INPUT_EVENT_ACK_STATE_SET_NON_BLOCKING;
+ callback.Run(INPUT_EVENT_ACK_STATE_SET_NON_BLOCKING, std::move(event),
+ latency_info, nullptr);
else
- return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
+ callback.Run(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, std::move(event),
+ latency_info, nullptr);
} else {
- return INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
+ callback.Run(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, std::move(event),
+ latency_info, nullptr);
}
}
« no previous file with comments | « content/renderer/input/input_event_filter.cc ('k') | content/renderer/input/input_handler_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698