| 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/platform/WebInputEventResult.h" | 13 #include "third_party/WebKit/public/platform/WebInputEventResult.h" |
| 14 #include "ui/events/blink/web_input_event_traits.h" | 14 #include "ui/events/blink/web_input_event_traits.h" |
| 15 #include "ui/gfx/geometry/vector2d_f.h" | 15 #include "ui/gfx/geometry/vector2d_f.h" |
| 16 | 16 |
| 17 namespace ui { | 17 namespace ui { |
| 18 class LatencyInfo; | 18 class LatencyInfo; |
| 19 class SynchronousInputHandlerProxy; | 19 class SynchronousInputHandlerProxy; |
| 20 struct DidOverscrollParams; | 20 struct DidOverscrollParams; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace content { | 23 namespace content { |
| 24 class InputHandlerManager; | 24 class InputHandlerManager; |
| 25 class MainThreadEventQueue; |
| 25 | 26 |
| 26 class CONTENT_EXPORT InputHandlerManagerClient { | 27 class CONTENT_EXPORT InputHandlerManagerClient { |
| 27 public: | 28 public: |
| 28 virtual ~InputHandlerManagerClient() {} | 29 virtual ~InputHandlerManagerClient() {} |
| 29 | 30 |
| 30 // Called from the main thread. | 31 // Called from the main thread. |
| 31 virtual void SetInputHandlerManager(InputHandlerManager*) = 0; | 32 virtual void SetInputHandlerManager(InputHandlerManager*) = 0; |
| 32 virtual void NotifyInputEventHandled(int routing_id, | |
| 33 blink::WebInputEvent::Type type, | |
| 34 blink::WebInputEventResult result, | |
| 35 InputEventAckState ack_result) = 0; | |
| 36 virtual void ProcessRafAlignedInput(int routing_id, | |
| 37 base::TimeTicks frame_time) = 0; | |
| 38 | 33 |
| 39 // Called from the compositor thread. | 34 // Called from the compositor thread. |
| 40 virtual void RegisterRoutingID(int routing_id) = 0; | 35 virtual void RegisterRoutingID( |
| 36 int routing_id, |
| 37 const scoped_refptr<MainThreadEventQueue>& input_event_queue) = 0; |
| 41 virtual void UnregisterRoutingID(int routing_id) = 0; | 38 virtual void UnregisterRoutingID(int routing_id) = 0; |
| 42 virtual void RegisterAssociatedRenderFrameRoutingID( | 39 virtual void RegisterAssociatedRenderFrameRoutingID( |
| 43 int render_frame_routing_id, | 40 int render_frame_routing_id, |
| 44 int render_view_routing_id) = 0; | 41 int render_view_routing_id) = 0; |
| 45 virtual void QueueClosureForMainThreadEventQueue( | 42 virtual void QueueClosureForMainThreadEventQueue( |
| 46 int routing_id, | 43 int routing_id, |
| 47 const base::Closure& closure) = 0; | 44 const base::Closure& closure) = 0; |
| 48 | 45 |
| 49 // |HandleInputEvent| will respond to overscroll by calling the passed in | 46 // |HandleInputEvent| will respond to overscroll by calling the passed in |
| 50 // callback. | 47 // callback. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 76 protected: | 73 protected: |
| 77 SynchronousInputHandlerProxyClient() {} | 74 SynchronousInputHandlerProxyClient() {} |
| 78 | 75 |
| 79 private: | 76 private: |
| 80 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); | 77 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); |
| 81 }; | 78 }; |
| 82 | 79 |
| 83 } // namespace content | 80 } // namespace content |
| 84 | 81 |
| 85 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ | 82 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ |
| OLD | NEW |