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

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

Issue 2785533003: Animated scroll shouldn't consume unhandled scrolls for OOPIFs. (Closed)
Patch Set: Fix Android compile. Created 3 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/browser/renderer_host/input/mock_input_router_client.cc
diff --git a/content/browser/renderer_host/input/mock_input_router_client.cc b/content/browser/renderer_host/input/mock_input_router_client.cc
index 2a3cde0700029e7e19db2d06e338e4bd7088a1bd..90e96682e121fc807fba3487d467f244275acd79 100644
--- a/content/browser/renderer_host/input/mock_input_router_client.cc
+++ b/content/browser/renderer_host/input/mock_input_router_client.cc
@@ -22,10 +22,10 @@ MockInputRouterClient::MockInputRouterClient()
: input_router_(NULL),
in_flight_event_count_(0),
has_touch_handler_(false),
+ is_in_gesture_scroll_(false),
filter_state_(INPUT_EVENT_ACK_STATE_NOT_CONSUMED),
filter_input_event_called_(false),
- did_flush_called_count_(0) {
-}
+ did_flush_called_count_(0) {}
MockInputRouterClient::~MockInputRouterClient() {}
@@ -70,6 +70,19 @@ void MockInputRouterClient::ForwardGestureEventWithLatencyInfo(
if (input_router_)
input_router_->SendGestureEvent(
GestureEventWithLatencyInfo(gesture_event, latency_info));
+ if (gesture_event.GetType() == blink::WebInputEvent::kGestureScrollBegin &&
+ !gesture_event.data.scroll_begin.synthetic) {
+ is_in_gesture_scroll_ = true;
+ } else if (gesture_event.GetType() ==
+ blink::WebInputEvent::kGestureScrollEnd &&
+ !gesture_event.data.scroll_end.synthetic) {
+ is_in_gesture_scroll_ = false;
+ }
+}
+
+bool MockInputRouterClient::is_in_gesture_scroll(
+ blink::WebGestureDevice device) {
+ return is_in_gesture_scroll_;
}
bool MockInputRouterClient::GetAndResetFilterEventCalled() {

Powered by Google App Engine
This is Rietveld 408576698