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

Unified Diff: content/browser/renderer_host/input/touch_emulator.cc

Issue 2869823003: [VSync Queue] Plug touch ack to gesture events and flush vsync queue if necessary (Closed)
Patch Set: dtapuska's comment: Use ack to determine blocking vs. non-blocking Created 3 years, 7 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
Index: content/browser/renderer_host/input/touch_emulator.cc
diff --git a/content/browser/renderer_host/input/touch_emulator.cc b/content/browser/renderer_host/input/touch_emulator.cc
index c7ec22f1a9203cfb7620ee163cd8c091bcdda889..6c25ee02371bdcccbe63e156972fa48d0af8071b 100644
--- a/content/browser/renderer_host/input/touch_emulator.cc
+++ b/content/browser/renderer_host/input/touch_emulator.cc
@@ -254,11 +254,11 @@ void TouchEmulator::HandleEmulatedTouchEvent(blink::WebTouchEvent event) {
if (!result.succeeded)
return;
- const bool event_consumed = true;
+ const ui::EventResult event_result = ui::ER_CONSUMED;
// Block emulated event when emulated native stream is active.
if (native_stream_active_sequence_count_) {
gesture_provider_->OnTouchEventAck(event.unique_touch_event_id,
- event_consumed);
+ event_result);
return;
}
@@ -266,7 +266,7 @@ void TouchEmulator::HandleEmulatedTouchEvent(blink::WebTouchEvent event) {
// Do not allow middle-sequence event to pass through, if start was blocked.
if (!emulated_stream_active_sequence_count_ && !is_sequence_start) {
gesture_provider_->OnTouchEventAck(event.unique_touch_event_id,
- event_consumed);
+ event_result);
return;
}
@@ -284,10 +284,12 @@ bool TouchEmulator::HandleTouchEventAck(
if (is_sequence_end)
emulated_stream_active_sequence_count_--;
- const bool event_consumed = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED;
+ const ui::EventResult event_result =
+ ack_result == INPUT_EVENT_ACK_STATE_CONSUMED ? ui::ER_CONSUMED
+ : ui::ER_UNHANDLED;
if (gesture_provider_)
gesture_provider_->OnTouchEventAck(event.unique_touch_event_id,
- event_consumed);
+ event_result);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698