| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_CLIENT_H_ |
| 6 #define CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_CLIENT_H_ | 6 #define CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_CLIENT_H_ |
| 7 | 7 |
| 8 namespace WebKit { | 8 namespace WebKit { |
| 9 class WebGestureCurve; | 9 class WebGestureCurve; |
| 10 struct WebActiveWheelFlingParameters; | 10 struct WebActiveWheelFlingParameters; |
| 11 struct WebFloatPoint; | 11 struct WebFloatPoint; |
| 12 struct WebSize; | 12 struct WebSize; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 // All callbacks invoked from the compositor thread. | 17 // All callbacks invoked from the compositor thread. |
| 18 class InputHandlerProxyClient { | 18 class InputHandlerProxyClient { |
| 19 public: | 19 public: |
| 20 // Called just before the InputHandlerProxy shuts down. | 20 // Called just before the InputHandlerProxy shuts down. |
| 21 virtual void WillShutdown() = 0; | 21 virtual void WillShutdown() = 0; |
| 22 | 22 |
| 23 // Exactly one of the following two callbacks will be invoked after every | |
| 24 // call to InputHandlerProxy::HandleInputEvent(): | |
| 25 | |
| 26 // Called when the InputHandlerProxy handled the input event and no | |
| 27 // further processing is required. | |
| 28 virtual void DidHandleInputEvent() = 0; | |
| 29 | |
| 30 // Called when the InputHandlerProxy did not handle the input event. | |
| 31 // If send_to_widget is true, the input event should be forwarded to the | |
| 32 // WebWidget associated with this compositor for further processing. | |
| 33 virtual void DidNotHandleInputEvent(bool send_to_widget) = 0; | |
| 34 | |
| 35 // Transfers an active wheel fling animation initiated by a previously | 23 // Transfers an active wheel fling animation initiated by a previously |
| 36 // handled input event out to the client. | 24 // handled input event out to the client. |
| 37 virtual void TransferActiveWheelFlingAnimation( | 25 virtual void TransferActiveWheelFlingAnimation( |
| 38 const WebKit::WebActiveWheelFlingParameters& params) = 0; | 26 const WebKit::WebActiveWheelFlingParameters& params) = 0; |
| 39 | 27 |
| 40 // Creates a new fling animation curve instance for device |device_source| | 28 // Creates a new fling animation curve instance for device |device_source| |
| 41 // with |velocity| and already scrolled |cumulative_scroll| pixels. | 29 // with |velocity| and already scrolled |cumulative_scroll| pixels. |
| 42 virtual WebKit::WebGestureCurve* CreateFlingAnimationCurve( | 30 virtual WebKit::WebGestureCurve* CreateFlingAnimationCurve( |
| 43 int device_source, | 31 int device_source, |
| 44 const WebKit::WebFloatPoint& velocity, | 32 const WebKit::WebFloatPoint& velocity, |
| 45 const WebKit::WebSize& cumulative_scroll) = 0; | 33 const WebKit::WebSize& cumulative_scroll) = 0; |
| 46 | 34 |
| 47 virtual void DidOverscroll(gfx::Vector2dF accumulated_overscroll, | 35 virtual void DidOverscroll(gfx::Vector2dF accumulated_overscroll, |
| 48 gfx::Vector2dF current_fling_velocity) = 0; | 36 gfx::Vector2dF current_fling_velocity) = 0; |
| 49 | 37 |
| 50 protected: | 38 protected: |
| 51 virtual ~InputHandlerProxyClient() {} | 39 virtual ~InputHandlerProxyClient() {} |
| 52 }; | 40 }; |
| 53 | 41 |
| 54 } // namespace content | 42 } // namespace content |
| 55 | 43 |
| 56 #endif // CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_CLIENT_H_ | 44 #endif // CONTENT_RENDERER_GPU_INPUT_HANDLER_PROXY_CLIENT_H_ |
| OLD | NEW |