1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 package org.chromium.content_public.browser;
8 * A class that is notified of events and state changes related to gesture processing from
11 public class GestureStateListener {
13 * Called when the pinch gesture starts.
15 public void onPinchStarted() {}
18 * Called when the pinch gesture ends.
20 public void onPinchEnded() {}
23 * Called when a fling starts.
25 public void onFlingStartGesture(int vx, int vy, int scrollOffsetY, int scrollExtentY) {}
28 * Called when a fling is cancelled.
30 public void onFlingCancelGesture() {}
33 * Called when a fling has ended.
35 public void onFlingEndGesture(int scrollOffsetY, int scrollExtentY) {}
38 * Called when a fling event was not handled by the renderer.
40 public void onUnhandledFlingStartEvent(int vx, int vy) {}
43 * Called to indicate that a scroll update gesture had been consumed by the page.
44 * This callback is called whenever any layer is scrolled (like a frame or div). It is
45 * not called when a JS touch handler consumes the event (preventDefault), it is not called
46 * for JS-initiated scrolling.
48 public void onScrollUpdateGestureConsumed() {}
51 * Called when a scroll gesture has started.
53 public void onScrollStarted(int scrollOffsetY, int scrollExtentY) {}
56 * Called when a scroll gesture has stopped.
58 public void onScrollEnded(int scrollOffsetY, int scrollExtentY) {}
61 * Called when the scroll offsets or extents may have changed.
63 public void onScrollOffsetOrExtentChanged(int scrollOffsetY, int scrollExtentY) {}