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" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // The client should only makes calls to |handler| on the compositor thread. | 37 // The client should only makes calls to |handler| on the compositor thread. |
38 typedef base::Callback< | 38 typedef base::Callback< |
39 InputEventAckState(int /*routing_id*/, | 39 InputEventAckState(int /*routing_id*/, |
40 const blink::WebInputEvent*, | 40 const blink::WebInputEvent*, |
41 ui::LatencyInfo* latency_info)> Handler; | 41 ui::LatencyInfo* latency_info)> Handler; |
42 | 42 |
43 // Called from the main thread. | 43 // Called from the main thread. |
44 virtual void SetBoundHandler(const Handler& handler) = 0; | 44 virtual void SetBoundHandler(const Handler& handler) = 0; |
45 | 45 |
46 // Called from the compositor thread. | 46 // Called from the compositor thread. |
47 virtual void DidAddInputHandler( | 47 virtual void DidAddInputHandler(int routing_id) = 0; |
48 int routing_id, | |
49 ui::SynchronousInputHandlerProxy* synchronous_handler) = 0; | |
50 virtual void DidRemoveInputHandler(int routing_id) = 0; | 48 virtual void DidRemoveInputHandler(int routing_id) = 0; |
51 virtual void DidOverscroll(int routing_id, | 49 virtual void DidOverscroll(int routing_id, |
52 const DidOverscrollParams& params) = 0; | 50 const DidOverscrollParams& params) = 0; |
53 virtual void DidStopFlinging(int routing_id) = 0; | 51 virtual void DidStopFlinging(int routing_id) = 0; |
54 virtual void NonBlockingInputEventHandled( | 52 virtual void NonBlockingInputEventHandled( |
55 int routing_id, | 53 int routing_id, |
56 blink::WebInputEvent::Type type) = 0; | 54 blink::WebInputEvent::Type type) = 0; |
57 | 55 |
58 protected: | 56 protected: |
59 InputHandlerManagerClient() {} | 57 InputHandlerManagerClient() {} |
60 | 58 |
61 private: | 59 private: |
62 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient); | 60 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient); |
63 }; | 61 }; |
64 | 62 |
| 63 class CONTENT_EXPORT SynchronousInputHandlerProxyClient { |
| 64 public: |
| 65 virtual ~SynchronousInputHandlerProxyClient() {} |
| 66 |
| 67 virtual void DidAddSynchronousHandlerProxy( |
| 68 int routing_id, |
| 69 ui::SynchronousInputHandlerProxy* synchronous_handler) = 0; |
| 70 virtual void DidRemoveSynchronousHandlerProxy(int routing_id) = 0; |
| 71 |
| 72 protected: |
| 73 SynchronousInputHandlerProxyClient() {} |
| 74 |
| 75 private: |
| 76 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); |
| 77 }; |
| 78 |
65 } // namespace content | 79 } // namespace content |
66 | 80 |
67 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ | 81 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ |
OLD | NEW |