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

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

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.h
diff --git a/content/browser/renderer_host/overscroll_controller.h b/content/browser/renderer_host/overscroll_controller.h
index 0f0ce8354892412a5010b4e1a605dab07a849a87..5577ce97f3d5893fc1076e87efcbdafaad3139c2 100644
--- a/content/browser/renderer_host/overscroll_controller.h
+++ b/content/browser/renderer_host/overscroll_controller.h
@@ -15,7 +15,7 @@ struct LatencyInfo;
namespace content {
-class MockRenderWidgetHost;
+class RenderWidgetHostViewAuraOverscrollTest;
class OverscrollControllerDelegate;
// Indicates the direction that the scroll is heading in relative to the screen,
@@ -38,18 +38,11 @@ class OverscrollController {
OverscrollController();
virtual ~OverscrollController();
- // The result of |DispatchEvent()|, indicating either how the event was
- // handled, or how it should be handled by the caller.
- enum Disposition {
- CONSUMED,
- SHOULD_FORWARD_TO_RENDERER,
- SHOULD_FORWARD_TO_GESTURE_QUEUE
- };
// This must be called when dispatching any event from the
// RenderWidgetHostView so that the state of the overscroll gesture can be
- // updated properly.
- Disposition DispatchEvent(const blink::WebInputEvent& event,
- const ui::LatencyInfo& latency_info);
+ // updated properly. Returns true if the event was handled, in which case
+ // further processing should cease.
+ bool WillHandleEvent(const blink::WebInputEvent& event);
// This must be called when the ACK for any event comes in. This updates the
// overscroll gesture status as appropriate.
@@ -73,7 +66,7 @@ class OverscrollController {
void Cancel();
private:
- friend class MockRenderWidgetHost;
+ friend class RenderWidgetHostViewAuraOverscrollTest;
// Different scrolling states.
enum ScrollState {

Powered by Google App Engine
This is Rietveld 408576698