input_handler_proxy_client.h revision 1320f92c476a1ad9d19dba2a48c72b75566198e9
1// Copyright 2013 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.
4
5#ifndef CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_CLIENT_H_
6#define CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_CLIENT_H_
7
8namespace blink {
9class WebGestureCurve;
10struct WebActiveWheelFlingParameters;
11struct WebFloatPoint;
12struct WebSize;
13}
14
15namespace content {
16
17struct DidOverscrollParams;
18
19// All callbacks invoked from the compositor thread.
20class InputHandlerProxyClient {
21 public:
22  // Called just before the InputHandlerProxy shuts down.
23  virtual void WillShutdown() = 0;
24
25  // Transfers an active wheel fling animation initiated by a previously
26  // handled input event out to the client.
27  virtual void TransferActiveWheelFlingAnimation(
28      const blink::WebActiveWheelFlingParameters& params) = 0;
29
30  // Creates a new fling animation curve instance for device |device_source|
31  // with |velocity| and already scrolled |cumulative_scroll| pixels.
32  virtual blink::WebGestureCurve* CreateFlingAnimationCurve(
33      blink::WebGestureDevice device_source,
34      const blink::WebFloatPoint& velocity,
35      const blink::WebSize& cumulative_scroll) = 0;
36
37  virtual void DidOverscroll(const DidOverscrollParams& params) = 0;
38
39  virtual void DidStopFlinging() = 0;
40
41  virtual void DidReceiveInputEvent() = 0;
42
43 protected:
44  virtual ~InputHandlerProxyClient() {}
45};
46
47}  // namespace content
48
49#endif  // CONTENT_RENDERER_INPUT_INPUT_HANDLER_PROXY_CLIENT_H_
50