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

Side by Side Diff: ui/events/blink/input_handler_proxy_client.h

Issue 2479123003: WIP Add getCoalescedEvents API using vector of WebInputEvents (Closed)
Patch Set: Creating CoalescedWebInputEvent Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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
10 namespace blink { 8 namespace blink {
11 class WebGestureCurve; 9 class WebGestureCurve;
12 struct WebActiveWheelFlingParameters; 10 struct WebActiveWheelFlingParameters;
13 struct WebFloatPoint; 11 struct WebFloatPoint;
14 struct WebSize; 12 struct WebSize;
15 } 13 }
16 14
17 namespace ui { 15 namespace ui {
18 16
19 // All callbacks invoked from the compositor thread. 17 // All callbacks invoked from the compositor thread.
20 class InputHandlerProxyClient { 18 class InputHandlerProxyClient {
21 public: 19 public:
22 // Called just before the InputHandlerProxy shuts down. 20 // Called just before the InputHandlerProxy shuts down.
23 virtual void WillShutdown() = 0; 21 virtual void WillShutdown() = 0;
24 22
25 // Transfers an active wheel fling animation initiated by a previously 23 // Transfers an active wheel fling animation initiated by a previously
26 // handled input event out to the client. 24 // handled input event out to the client.
27 virtual void TransferActiveWheelFlingAnimation( 25 virtual void TransferActiveWheelFlingAnimation(
28 const blink::WebActiveWheelFlingParameters& params) = 0; 26 const blink::WebActiveWheelFlingParameters& params) = 0;
29 27
30 // Dispatch a non blocking event to the main thread. This is used when a 28 // 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 29 // gesture fling from a touchpad is processed and the target only has
32 // passive event listeners. If the target has blocking event listeners 30 // passive event listeners. If the target has blocking event listeners
33 // |TransferActiveWheelFlingAnimation| will be used instead. 31 // |TransferActiveWheelFlingAnimation| will be used instead.
34 virtual void DispatchNonBlockingEventToMainThread( 32 virtual void DispatchNonBlockingEventToMainThread(
35 ui::ScopedWebInputEvent event, 33 blink::ScopedCoalescedWebInputEvent event,
36 const ui::LatencyInfo& latency_info) = 0; 34 const ui::LatencyInfo& latency_info) = 0;
37 35
38 // Creates a new fling animation curve instance for device |device_source| 36 // Creates a new fling animation curve instance for device |device_source|
39 // with |velocity| and already scrolled |cumulative_scroll| pixels. 37 // with |velocity| and already scrolled |cumulative_scroll| pixels.
40 virtual blink::WebGestureCurve* CreateFlingAnimationCurve( 38 virtual blink::WebGestureCurve* CreateFlingAnimationCurve(
41 blink::WebGestureDevice device_source, 39 blink::WebGestureDevice device_source,
42 const blink::WebFloatPoint& velocity, 40 const blink::WebFloatPoint& velocity,
43 const blink::WebSize& cumulative_scroll) = 0; 41 const blink::WebSize& cumulative_scroll) = 0;
44 42
45 // |HandleInputEvent/WithLatencyInfo| will respond to overscroll by calling 43 // |HandleInputEvent/WithLatencyInfo| will respond to overscroll by calling
46 // the passed in callback. 44 // the passed in callback.
47 // Otherwise |DidOverscroll| will be fired. 45 // Otherwise |DidOverscroll| will be fired.
48 virtual void DidOverscroll( 46 virtual void DidOverscroll(
49 const gfx::Vector2dF& accumulated_overscroll, 47 const gfx::Vector2dF& accumulated_overscroll,
50 const gfx::Vector2dF& latest_overscroll_delta, 48 const gfx::Vector2dF& latest_overscroll_delta,
51 const gfx::Vector2dF& current_fling_velocity, 49 const gfx::Vector2dF& current_fling_velocity,
52 const gfx::PointF& causal_event_viewport_point) = 0; 50 const gfx::PointF& causal_event_viewport_point) = 0;
53 51
54 virtual void DidStopFlinging() = 0; 52 virtual void DidStopFlinging() = 0;
55 53
56 virtual void DidAnimateForInput() = 0; 54 virtual void DidAnimateForInput() = 0;
57 55
58 protected: 56 protected:
59 virtual ~InputHandlerProxyClient() {} 57 virtual ~InputHandlerProxyClient() {}
60 }; 58 };
61 59
62 } // namespace ui 60 } // namespace ui
63 61
64 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_CLIENT_H_ 62 #endif // UI_EVENTS_BLINK_INPUT_HANDLER_PROXY_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698