| 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 { | |
| 17 class LatencyInfo; | |
| 18 struct DidOverscrollParams; | |
| 19 } | |
| 20 | |
| 21 namespace cc { | 16 namespace cc { |
| 22 class InputHandler; | 17 class InputHandler; |
| 23 } | 18 } |
| 24 | 19 |
| 25 namespace ui { | 20 namespace ui { |
| 26 class SynchronousInputHandlerProxy; | 21 class SynchronousInputHandlerProxy; |
| 22 struct DidOverscrollParams; |
| 27 } | 23 } |
| 28 | 24 |
| 29 namespace content { | 25 namespace content { |
| 30 class InputHandlerManager; | 26 class InputHandlerManager; |
| 31 | 27 |
| 32 class CONTENT_EXPORT InputHandlerManagerClient { | 28 class CONTENT_EXPORT InputHandlerManagerClient { |
| 33 public: | 29 public: |
| 34 virtual ~InputHandlerManagerClient() {} | 30 virtual ~InputHandlerManagerClient() {} |
| 35 | 31 |
| 36 // Called from the main thread. | 32 // Called from the main thread. |
| 37 virtual void SetInputHandlerManager(InputHandlerManager*) = 0; | 33 virtual void SetInputHandlerManager(InputHandlerManager*) = 0; |
| 38 virtual void NotifyInputEventHandled(int routing_id, | 34 virtual void NotifyInputEventHandled(int routing_id, |
| 39 blink::WebInputEvent::Type type, | 35 blink::WebInputEvent::Type type, |
| 40 InputEventAckState ack_result) = 0; | 36 InputEventAckState ack_result) = 0; |
| 41 virtual void ProcessRafAlignedInput(int routing_id) = 0; | 37 virtual void ProcessRafAlignedInput(int routing_id) = 0; |
| 42 | 38 |
| 43 // Called from the compositor thread. | 39 // Called from the compositor thread. |
| 44 virtual void RegisterRoutingID(int routing_id) = 0; | 40 virtual void RegisterRoutingID(int routing_id) = 0; |
| 45 virtual void UnregisterRoutingID(int routing_id) = 0; | 41 virtual void UnregisterRoutingID(int routing_id) = 0; |
| 42 |
| 43 // Overscroll triggered by |HandleInputEvent| will response to passed-in |
| 44 // callback. (e.g. |InputEventFilter::DidForwardToHandlerAndOverscroll|) |
| 45 // Otherwise |DidOverscroll| will be fired. |
| 46 virtual void DidOverscroll(int routing_id, | 46 virtual void DidOverscroll(int routing_id, |
| 47 const ui::DidOverscrollParams& params) = 0; | 47 const ui::DidOverscrollParams& params) = 0; |
| 48 virtual void DidStartFlinging(int routing_id) = 0; | 48 virtual void DidStartFlinging(int routing_id) = 0; |
| 49 virtual void DidStopFlinging(int routing_id) = 0; | 49 virtual void DidStopFlinging(int routing_id) = 0; |
| 50 | 50 |
| 51 protected: | 51 protected: |
| 52 InputHandlerManagerClient() {} | 52 InputHandlerManagerClient() {} |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient); | 55 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 67 protected: | 67 protected: |
| 68 SynchronousInputHandlerProxyClient() {} | 68 SynchronousInputHandlerProxyClient() {} |
| 69 | 69 |
| 70 private: | 70 private: |
| 71 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); | 71 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace content | 74 } // namespace content |
| 75 | 75 |
| 76 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ | 76 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ |
| OLD | NEW |