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 CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ | 5 #ifndef CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ |
6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ | 6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "content/common/input/input_event_ack_state.h" | 12 #include "content/common/input/input_event_ack_state.h" |
13 #include "third_party/WebKit/public/web/WebInputEvent.h" | 13 #include "third_party/WebKit/public/web/WebInputEvent.h" |
14 #include "ui/gfx/geometry/vector2d_f.h" | 14 #include "ui/gfx/geometry/vector2d_f.h" |
15 | 15 |
16 namespace ui { | 16 namespace ui { |
17 class LatencyInfo; | 17 class LatencyInfo; |
18 struct DidOverscrollParams; | 18 struct DidOverscrollParams; |
19 } | 19 } |
20 | 20 |
21 namespace cc { | 21 namespace cc { |
22 class InputHandler; | 22 class InputHandler; |
23 } | 23 } |
24 | 24 |
25 namespace ui { | 25 namespace ui { |
26 class SynchronousInputHandlerProxy; | 26 class SynchronousInputHandlerProxy; |
27 } | 27 } |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 class InputHandlerManager; | |
30 | 31 |
31 class CONTENT_EXPORT InputHandlerManagerClient { | 32 class CONTENT_EXPORT InputHandlerManagerClient { |
32 public: | 33 public: |
33 virtual ~InputHandlerManagerClient() {} | 34 virtual ~InputHandlerManagerClient() {} |
34 | 35 |
35 // The Manager will supply a |handler| when bound to the client. This is valid | 36 // The Manager will supply a |handler| when bound to the client. This is valid |
36 // until the manager shuts down, at which point it supplies a null |handler|. | 37 // until the manager shuts down, at which point it supplies a null |handler|. |
37 // The client should only makes calls to |handler| on the compositor thread. | 38 // The client should only makes calls to |handler| on the compositor thread. |
38 typedef base::Callback< | 39 typedef base::Callback< |
39 InputEventAckState(int /*routing_id*/, | 40 InputEventAckState(int /*routing_id*/, |
40 const blink::WebInputEvent*, | 41 const blink::WebInputEvent*, |
41 ui::LatencyInfo* latency_info)> Handler; | 42 ui::LatencyInfo* latency_info)> Handler; |
tdresser
2016/08/24 13:42:59
Is this still used?
dtapuska
2016/08/24 17:10:06
removed.
| |
42 | 43 |
43 // Called from the main thread. | 44 // Called from the main thread. |
44 virtual void SetBoundHandler(const Handler& handler) = 0; | 45 virtual void SetInputHandlerManager(InputHandlerManager*) = 0; |
45 virtual void NotifyInputEventHandled(int routing_id, | 46 virtual void NotifyInputEventHandled(int routing_id, |
46 blink::WebInputEvent::Type type, | 47 blink::WebInputEvent::Type type, |
47 InputEventAckState ack_result) = 0; | 48 InputEventAckState ack_result) = 0; |
49 virtual void ProcessRafAlignedInput(int routing_id) = 0; | |
48 | 50 |
49 // Called from the compositor thread. | 51 // Called from the compositor thread. |
50 virtual void RegisterRoutingID(int routing_id) = 0; | 52 virtual void RegisterRoutingID(int routing_id) = 0; |
51 virtual void UnregisterRoutingID(int routing_id) = 0; | 53 virtual void UnregisterRoutingID(int routing_id) = 0; |
52 virtual void DidOverscroll(int routing_id, | 54 virtual void DidOverscroll(int routing_id, |
53 const ui::DidOverscrollParams& params) = 0; | 55 const ui::DidOverscrollParams& params) = 0; |
54 virtual void DidStartFlinging(int routing_id) = 0; | 56 virtual void DidStartFlinging(int routing_id) = 0; |
55 virtual void DidStopFlinging(int routing_id) = 0; | 57 virtual void DidStopFlinging(int routing_id) = 0; |
56 | 58 |
57 protected: | 59 protected: |
(...skipping 15 matching lines...) Expand all Loading... | |
73 protected: | 75 protected: |
74 SynchronousInputHandlerProxyClient() {} | 76 SynchronousInputHandlerProxyClient() {} |
75 | 77 |
76 private: | 78 private: |
77 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); | 79 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); |
78 }; | 80 }; |
79 | 81 |
80 } // namespace content | 82 } // namespace content |
81 | 83 |
82 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ | 84 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ |
OLD | NEW |