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

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

Issue 131373004: Let the browser know the end of fling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile break Created 6 years, 11 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.h ('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.cc
diff --git a/content/renderer/input/input_event_filter.cc b/content/renderer/input/input_event_filter.cc
index a0399783988e64a7d0a00a3e59de5b6c607d0474..62d8dd3c180c82c9f1d489b73691213852acef0e 100644
--- a/content/renderer/input/input_event_filter.cc
+++ b/content/renderer/input/input_event_filter.cc
@@ -52,17 +52,16 @@ void InputEventFilter::DidRemoveInputHandler(int routing_id) {
void InputEventFilter::DidOverscroll(int routing_id,
const cc::DidOverscrollParams& params) {
- DCHECK(target_loop_->BelongsToCurrentThread());
-
if (!overscroll_notifications_enabled_)
return;
- io_loop_->PostTask(
- FROM_HERE,
- base::Bind(&InputEventFilter::SendMessageOnIOThread, this,
- ViewHostMsg_DidOverscroll(routing_id,
- params.accumulated_overscroll,
- params.current_fling_velocity)));
+ SendMessage(ViewHostMsg_DidOverscroll(routing_id,
+ params.accumulated_overscroll,
+ params.current_fling_velocity));
+}
+
+void InputEventFilter::DidStopFlinging(int routing_id) {
+ SendMessage(ViewHostMsg_DidStopFlinging(routing_id));
}
void InputEventFilter::OnFilterAdded(IPC::Channel* channel) {
@@ -154,13 +153,16 @@ void InputEventFilter::SendACK(blink::WebInputEvent::Type type,
InputEventAckState ack_result,
const ui::LatencyInfo& latency_info,
int routing_id) {
+ SendMessage(InputHostMsg_HandleInputEvent_ACK(
+ routing_id, type, ack_result, latency_info));
+}
+
+void InputEventFilter::SendMessage(const IPC::Message& message) {
DCHECK(target_loop_->BelongsToCurrentThread());
io_loop_->PostTask(
FROM_HERE,
- base::Bind(&InputEventFilter::SendMessageOnIOThread, this,
- InputHostMsg_HandleInputEvent_ACK(
- routing_id, type, ack_result, latency_info)));
+ base::Bind(&InputEventFilter::SendMessageOnIOThread, this, message));
}
void InputEventFilter::SendMessageOnIOThread(const IPC::Message& message) {
« no previous file with comments | « content/renderer/input/input_event_filter.h ('k') | content/renderer/input/input_handler_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698