| 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/events/blink/scoped_web_input_event.h" |
| 14 #include "ui/gfx/geometry/vector2d_f.h" | 15 #include "ui/gfx/geometry/vector2d_f.h" |
| 15 | 16 |
| 16 namespace ui { | 17 namespace ui { |
| 17 class LatencyInfo; | 18 class LatencyInfo; |
| 18 struct DidOverscrollParams; | 19 struct DidOverscrollParams; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace cc { | 22 namespace cc { |
| 22 class InputHandler; | 23 class InputHandler; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace ui { | 26 namespace ui { |
| 27 class LatencyInfo; |
| 26 class SynchronousInputHandlerProxy; | 28 class SynchronousInputHandlerProxy; |
| 27 } | 29 } |
| 28 | 30 |
| 29 namespace content { | 31 namespace content { |
| 30 | 32 |
| 31 class CONTENT_EXPORT InputHandlerManagerClient { | 33 class CONTENT_EXPORT InputHandlerManagerClient { |
| 32 public: | 34 public: |
| 33 virtual ~InputHandlerManagerClient() {} | 35 virtual ~InputHandlerManagerClient() {} |
| 34 | 36 |
| 35 // The Manager will supply a |handler| when bound to the client. This is valid | 37 // The Manager will supply a |handler| when bound to the client. This is valid |
| (...skipping 10 matching lines...) Expand all Loading... |
| 46 blink::WebInputEvent::Type type, | 48 blink::WebInputEvent::Type type, |
| 47 InputEventAckState ack_result) = 0; | 49 InputEventAckState ack_result) = 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; |
| 58 virtual void DispatchNonBlockingEventToMainThread( |
| 59 int routing_id, |
| 60 ui::ScopedWebInputEvent event, |
| 61 const ui::LatencyInfo& latency_info) = 0; |
| 56 | 62 |
| 57 protected: | 63 protected: |
| 58 InputHandlerManagerClient() {} | 64 InputHandlerManagerClient() {} |
| 59 | 65 |
| 60 private: | 66 private: |
| 61 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient); | 67 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient); |
| 62 }; | 68 }; |
| 63 | 69 |
| 64 class CONTENT_EXPORT SynchronousInputHandlerProxyClient { | 70 class CONTENT_EXPORT SynchronousInputHandlerProxyClient { |
| 65 public: | 71 public: |
| 66 virtual ~SynchronousInputHandlerProxyClient() {} | 72 virtual ~SynchronousInputHandlerProxyClient() {} |
| 67 | 73 |
| 68 virtual void DidAddSynchronousHandlerProxy( | 74 virtual void DidAddSynchronousHandlerProxy( |
| 69 int routing_id, | 75 int routing_id, |
| 70 ui::SynchronousInputHandlerProxy* synchronous_handler) = 0; | 76 ui::SynchronousInputHandlerProxy* synchronous_handler) = 0; |
| 71 virtual void DidRemoveSynchronousHandlerProxy(int routing_id) = 0; | 77 virtual void DidRemoveSynchronousHandlerProxy(int routing_id) = 0; |
| 72 | 78 |
| 73 protected: | 79 protected: |
| 74 SynchronousInputHandlerProxyClient() {} | 80 SynchronousInputHandlerProxyClient() {} |
| 75 | 81 |
| 76 private: | 82 private: |
| 77 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); | 83 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); |
| 78 }; | 84 }; |
| 79 | 85 |
| 80 } // namespace content | 86 } // namespace content |
| 81 | 87 |
| 82 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ | 88 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ |
| OLD | NEW |