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

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

Issue 2259983002: Pending input event count can get thrown off by coalesced events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add brackets Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bc0fac27a04a573968c2fe49984a474078b7652c..522138293804a0a5fbc70749f0e4d0866fc0aeb5 100644
--- a/content/renderer/input/main_thread_event_queue.cc
+++ b/content/renderer/input/main_thread_event_queue.cc
@@ -3,8 +3,10 @@
// found in the LICENSE file.
#include "content/renderer/input/main_thread_event_queue.h"
+
#include "content/common/input/event_with_latency_info.h"
#include "content/common/input_messages.h"
+#include "content/renderer/render_thread_impl.h"
namespace content {
@@ -116,9 +118,15 @@ void MainThreadEventQueue::PopEventOnMainThread() {
void MainThreadEventQueue::EventHandled(blink::WebInputEvent::Type type,
InputEventAckState ack_result) {
if (in_flight_event_) {
+ RenderThreadImpl* render_thread_impl = RenderThreadImpl::current();
// Send acks for blocking touch events.
- for (const auto id : in_flight_event_->eventsToAck())
+ for (const auto id : in_flight_event_->eventsToAck()) {
client_->SendInputEventAck(routing_id_, type, ack_result, id);
+ if (render_thread_impl) {
+ render_thread_impl->GetRendererScheduler()
+ ->DidHandleInputEventOnMainThread(in_flight_event_->event());
+ }
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698