| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_CLIENT_H_ | 5 #ifndef UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_CLIENT_H_ |
| 6 #define UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_CLIENT_H_ | 6 #define UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_CLIENT_H_ |
| 7 | 7 |
| 8 #include "ui/events/blink/scoped_web_input_event.h" |
| 9 |
| 8 namespace blink { | 10 namespace blink { |
| 9 class WebGestureCurve; | 11 class WebGestureCurve; |
| 10 struct WebActiveWheelFlingParameters; | 12 struct WebActiveWheelFlingParameters; |
| 11 struct WebFloatPoint; | 13 struct WebFloatPoint; |
| 12 struct WebSize; | 14 struct WebSize; |
| 13 } | 15 } |
| 14 | 16 |
| 15 namespace ui { | 17 namespace ui { |
| 16 | 18 |
| 17 // All callbacks invoked from the compositor thread. | 19 // All callbacks invoked from the compositor thread. |
| 18 class InputHandlerProxyClient { | 20 class InputHandlerProxyClient { |
| 19 public: | 21 public: |
| 20 // Called just before the InputHandlerProxy shuts down. | 22 // Called just before the InputHandlerProxy shuts down. |
| 21 virtual void WillShutdown() = 0; | 23 virtual void WillShutdown() = 0; |
| 22 | 24 |
| 23 // Transfers an active wheel fling animation initiated by a previously | 25 // Transfers an active wheel fling animation initiated by a previously |
| 24 // handled input event out to the client. | 26 // handled input event out to the client. |
| 25 virtual void TransferActiveWheelFlingAnimation( | 27 virtual void TransferActiveWheelFlingAnimation( |
| 26 const blink::WebActiveWheelFlingParameters& params) = 0; | 28 const blink::WebActiveWheelFlingParameters& params) = 0; |
| 27 | 29 |
| 30 // Dispatch a non blocking event to the main thread. This is used when a |
| 31 // gesture fling from a touchpad is processed and the target only has |
| 32 // passive event listeners. If the target has blocking event listeners |
| 33 // |TransferActiveWheelFlingAnimation| will be used instead. |
| 34 virtual void DispatchNonBlockingEventToMainThread( |
| 35 ui::ScopedWebInputEvent event, |
| 36 const ui::LatencyInfo& latency_info) = 0; |
| 37 |
| 28 // Creates a new fling animation curve instance for device |device_source| | 38 // Creates a new fling animation curve instance for device |device_source| |
| 29 // with |velocity| and already scrolled |cumulative_scroll| pixels. | 39 // with |velocity| and already scrolled |cumulative_scroll| pixels. |
| 30 virtual blink::WebGestureCurve* CreateFlingAnimationCurve( | 40 virtual blink::WebGestureCurve* CreateFlingAnimationCurve( |
| 31 blink::WebGestureDevice device_source, | 41 blink::WebGestureDevice device_source, |
| 32 const blink::WebFloatPoint& velocity, | 42 const blink::WebFloatPoint& velocity, |
| 33 const blink::WebSize& cumulative_scroll) = 0; | 43 const blink::WebSize& cumulative_scroll) = 0; |
| 34 | 44 |
| 35 virtual void DidOverscroll( | 45 virtual void DidOverscroll( |
| 36 const gfx::Vector2dF& accumulated_overscroll, | 46 const gfx::Vector2dF& accumulated_overscroll, |
| 37 const gfx::Vector2dF& latest_overscroll_delta, | 47 const gfx::Vector2dF& latest_overscroll_delta, |
| 38 const gfx::Vector2dF& current_fling_velocity, | 48 const gfx::Vector2dF& current_fling_velocity, |
| 39 const gfx::PointF& causal_event_viewport_point) = 0; | 49 const gfx::PointF& causal_event_viewport_point) = 0; |
| 40 | 50 |
| 41 virtual void DidStartFlinging() = 0; | 51 virtual void DidStartFlinging() = 0; |
| 42 | 52 |
| 43 virtual void DidStopFlinging() = 0; | 53 virtual void DidStopFlinging() = 0; |
| 44 | 54 |
| 45 virtual void DidAnimateForInput() = 0; | 55 virtual void DidAnimateForInput() = 0; |
| 46 | 56 |
| 47 protected: | 57 protected: |
| 48 virtual ~InputHandlerProxyClient() {} | 58 virtual ~InputHandlerProxyClient() {} |
| 49 }; | 59 }; |
| 50 | 60 |
| 51 } // namespace ui | 61 } // namespace ui |
| 52 | 62 |
| 53 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_CLIENT_H_ | 63 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_CLIENT_H_ |
| OLD | NEW |