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

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

Issue 1888163003: Articulate the cancel behavior in the WebTouchEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issue with reporting uma metrics Created 4 years, 8 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/renderer/input/main_thread_event_queue.cc
diff --git a/content/renderer/input/main_thread_event_queue.cc b/content/renderer/input/main_thread_event_queue.cc
index d2af3e281d407016829688700f377beeffb220c6..107712e075070a7fb9e3fc6e4618dad5a0486169 100644
--- a/content/renderer/input/main_thread_event_queue.cc
+++ b/content/renderer/input/main_thread_event_queue.cc
@@ -48,21 +48,26 @@ bool MainThreadEventQueue::HandleEvent(
}
}
} else if (blink::WebInputEvent::isTouchEventType(event->type)) {
+ PendingTouchEvent new_touch_event =
dtapuska 2016/04/18 20:10:37 err this is a poorly name variable. I thought I ch
+ PendingTouchEvent(*static_cast<const blink::WebTouchEvent*>(event),
+ latency, dispatch_type);
+ if (non_blocking) {
+ new_touch_event.event.dispatchType =
+ blink::WebInputEvent::ListenersNonBlockingPassive;
tdresser 2016/04/18 20:22:40 Hrm, this is a bit confusing, as a non-blocking ev
+ }
if (touch_events_.state() == WebInputEventQueueState::ITEM_PENDING) {
- touch_events_.Queue(
- PendingTouchEvent(*static_cast<const blink::WebTouchEvent*>(event),
- latency, dispatch_type));
+ touch_events_.Queue(new_touch_event);
} else {
if (non_blocking) {
touch_events_.set_state(WebInputEventQueueState::ITEM_PENDING);
- client_->SendEventToMainThread(routing_id_, event, latency,
- dispatch_type);
+ client_->SendEventToMainThread(routing_id_, &new_touch_event.event,
+ latency, dispatch_type);
} else {
// If there is nothing in the event queue and the event is
// blocking pass the |original_dispatch_type| to avoid
// having the main thread call us back as an optimization.
- client_->SendEventToMainThread(routing_id_, event, latency,
- original_dispatch_type);
+ client_->SendEventToMainThread(routing_id_, &new_touch_event.event,
+ latency, original_dispatch_type);
}
}
} else {
« no previous file with comments | « content/common/input/web_touch_event_traits.cc ('k') | content/renderer/input/render_widget_input_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698