| 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 cc { | 17 namespace cc { |
| 17 class InputHandler; | 18 class InputHandler; |
| 18 } | 19 } |
| 19 | 20 |
| 20 namespace ui { | 21 namespace ui { |
| 21 class SynchronousInputHandlerProxy; | 22 class SynchronousInputHandlerProxy; |
| 22 struct DidOverscrollParams; | 23 struct DidOverscrollParams; |
| 23 } | 24 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 40 virtual void RegisterRoutingID(int routing_id) = 0; | 41 virtual void RegisterRoutingID(int routing_id) = 0; |
| 41 virtual void UnregisterRoutingID(int routing_id) = 0; | 42 virtual void UnregisterRoutingID(int routing_id) = 0; |
| 42 | 43 |
| 43 // |HandleInputEvent| will respond to overscroll by calling the passed in | 44 // |HandleInputEvent| will respond to overscroll by calling the passed in |
| 44 // callback. | 45 // callback. |
| 45 // Otherwise |DidOverscroll| will be fired. | 46 // Otherwise |DidOverscroll| will be fired. |
| 46 virtual void DidOverscroll(int routing_id, | 47 virtual void DidOverscroll(int routing_id, |
| 47 const ui::DidOverscrollParams& params) = 0; | 48 const ui::DidOverscrollParams& params) = 0; |
| 48 virtual void DidStartFlinging(int routing_id) = 0; | 49 virtual void DidStartFlinging(int routing_id) = 0; |
| 49 virtual void DidStopFlinging(int routing_id) = 0; | 50 virtual void DidStopFlinging(int routing_id) = 0; |
| 51 virtual void DispatchNonBlockingEventToMainThread( |
| 52 int routing_id, |
| 53 ui::ScopedWebInputEvent event) = 0; |
| 50 | 54 |
| 51 protected: | 55 protected: |
| 52 InputHandlerManagerClient() {} | 56 InputHandlerManagerClient() {} |
| 53 | 57 |
| 54 private: | 58 private: |
| 55 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient); | 59 DISALLOW_COPY_AND_ASSIGN(InputHandlerManagerClient); |
| 56 }; | 60 }; |
| 57 | 61 |
| 58 class CONTENT_EXPORT SynchronousInputHandlerProxyClient { | 62 class CONTENT_EXPORT SynchronousInputHandlerProxyClient { |
| 59 public: | 63 public: |
| 60 virtual ~SynchronousInputHandlerProxyClient() {} | 64 virtual ~SynchronousInputHandlerProxyClient() {} |
| 61 | 65 |
| 62 virtual void DidAddSynchronousHandlerProxy( | 66 virtual void DidAddSynchronousHandlerProxy( |
| 63 int routing_id, | 67 int routing_id, |
| 64 ui::SynchronousInputHandlerProxy* synchronous_handler) = 0; | 68 ui::SynchronousInputHandlerProxy* synchronous_handler) = 0; |
| 65 virtual void DidRemoveSynchronousHandlerProxy(int routing_id) = 0; | 69 virtual void DidRemoveSynchronousHandlerProxy(int routing_id) = 0; |
| 66 | 70 |
| 67 protected: | 71 protected: |
| 68 SynchronousInputHandlerProxyClient() {} | 72 SynchronousInputHandlerProxyClient() {} |
| 69 | 73 |
| 70 private: | 74 private: |
| 71 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); | 75 DISALLOW_COPY_AND_ASSIGN(SynchronousInputHandlerProxyClient); |
| 72 }; | 76 }; |
| 73 | 77 |
| 74 } // namespace content | 78 } // namespace content |
| 75 | 79 |
| 76 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ | 80 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_CLIENT_H_ |
| OLD | NEW |