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

Unified Diff: content/browser/renderer_host/overscroll_controller.cc

Issue 291003002: Move OverscrollController to RenderWidgetHostViewAura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK_GE Created 6 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/overscroll_controller.cc
diff --git a/content/browser/renderer_host/overscroll_controller.cc b/content/browser/renderer_host/overscroll_controller.cc
index 77e52d318e5711b9c50cd607979f2af44b145934..3a6e7576563ec418bbed099ce312cf9def97b49e 100644
--- a/content/browser/renderer_host/overscroll_controller.cc
+++ b/content/browser/renderer_host/overscroll_controller.cc
@@ -34,9 +34,7 @@ OverscrollController::OverscrollController()
OverscrollController::~OverscrollController() {
}
-OverscrollController::Disposition OverscrollController::DispatchEvent(
- const blink::WebInputEvent& event,
- const ui::LatencyInfo& latency_info) {
+bool OverscrollController::WillHandleEvent(const blink::WebInputEvent& event) {
if (scroll_state_ != STATE_UNKNOWN) {
switch (event.type) {
case blink::WebInputEvent::GestureScrollEnd:
@@ -67,41 +65,24 @@ OverscrollController::Disposition OverscrollController::DispatchEvent(
if (DispatchEventCompletesAction(event)) {
CompleteAction();
- // If the overscroll was caused by touch-scrolling, then the gesture event
- // that completes the action needs to be sent to the renderer, because the
- // touch-scrolls maintain state in the renderer side (in the compositor, for
- // example), and the event that completes this action needs to be sent to
- // the renderer so that those states can be updated/reset appropriately.
- if (blink::WebInputEvent::isGestureEventType(event.type)) {
- // A gesture-event isn't sent to the GestureEventQueue when overscroll is
- // in progress. So dispatch the event through the RenderWidgetHost so that
- // it can reach the GestureEventQueue.
- return SHOULD_FORWARD_TO_GESTURE_QUEUE;
- }
-
- return SHOULD_FORWARD_TO_RENDERER;
+ // Let the event be dispatched to the renderer.
+ return false;
}
if (overscroll_mode_ != OVERSCROLL_NONE && DispatchEventResetsState(event)) {
SetOverscrollMode(OVERSCROLL_NONE);
- if (blink::WebInputEvent::isGestureEventType(event.type)) {
- // A gesture-event isn't sent to the GestureEventQueue when overscroll is
- // in progress. So dispatch the event through the RenderWidgetHost so that
- // it can reach the GestureEventQueue.
- return SHOULD_FORWARD_TO_GESTURE_QUEUE;
- }
// Let the event be dispatched to the renderer.
- return SHOULD_FORWARD_TO_RENDERER;
+ return false;
}
if (overscroll_mode_ != OVERSCROLL_NONE) {
// Consume the event only if it updates the overscroll state.
if (ProcessEventForOverscroll(event))
- return CONSUMED;
+ return true;
}
- return SHOULD_FORWARD_TO_RENDERER;
+ return false;
}
void OverscrollController::ReceivedEventACK(const blink::WebInputEvent& event,
« no previous file with comments | « content/browser/renderer_host/overscroll_controller.h ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698