| 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_H_ | 5 #ifndef CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ |
| 6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ | 6 #define CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/containers/scoped_ptr_hash_map.h" | 8 #include "base/containers/scoped_ptr_hash_map.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.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 "content/renderer/render_view_impl.h" | 13 #include "content/renderer/render_view_impl.h" |
| 14 #include "ui/events/blink/scoped_web_input_event.h" |
| 14 | 15 |
| 15 namespace base { | 16 namespace base { |
| 16 class SingleThreadTaskRunner; | 17 class SingleThreadTaskRunner; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace cc { | 20 namespace cc { |
| 20 class InputHandler; | 21 class InputHandler; |
| 21 struct InputHandlerScrollResult; | 22 struct InputHandlerScrollResult; |
| 22 } | 23 } |
| 23 | 24 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // Called from the compositor's thread. | 89 // Called from the compositor's thread. |
| 89 void DidOverscroll(int routing_id, const ui::DidOverscrollParams& params); | 90 void DidOverscroll(int routing_id, const ui::DidOverscrollParams& params); |
| 90 | 91 |
| 91 // Called from the compositor's thread. | 92 // Called from the compositor's thread. |
| 92 void DidStartFlinging(int routing_id); | 93 void DidStartFlinging(int routing_id); |
| 93 void DidStopFlinging(int routing_id); | 94 void DidStopFlinging(int routing_id); |
| 94 | 95 |
| 95 // Called from the compositor's thread. | 96 // Called from the compositor's thread. |
| 96 void DidAnimateForInput(); | 97 void DidAnimateForInput(); |
| 97 | 98 |
| 99 // Called from the compositor's thread. |
| 100 void DispatchNonBlockingEventToMainThread( |
| 101 int routing_id, |
| 102 ui::ScopedWebInputEvent event, |
| 103 const ui::LatencyInfo& latency_info); |
| 104 |
| 98 private: | 105 private: |
| 99 // Called from the compositor's thread. | 106 // Called from the compositor's thread. |
| 100 void AddInputHandlerOnCompositorThread( | 107 void AddInputHandlerOnCompositorThread( |
| 101 int routing_id, | 108 int routing_id, |
| 102 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner, | 109 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner, |
| 103 const base::WeakPtr<cc::InputHandler>& input_handler, | 110 const base::WeakPtr<cc::InputHandler>& input_handler, |
| 104 const base::WeakPtr<RenderViewImpl>& render_view_impl, | 111 const base::WeakPtr<RenderViewImpl>& render_view_impl, |
| 105 bool enable_smooth_scrolling); | 112 bool enable_smooth_scrolling); |
| 106 | 113 |
| 107 void RegisterRoutingIDOnCompositorThread(int routing_id); | 114 void RegisterRoutingIDOnCompositorThread(int routing_id); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 125 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 132 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 126 InputHandlerManagerClient* const client_; | 133 InputHandlerManagerClient* const client_; |
| 127 // May be null. | 134 // May be null. |
| 128 SynchronousInputHandlerProxyClient* const synchronous_handler_proxy_client_; | 135 SynchronousInputHandlerProxyClient* const synchronous_handler_proxy_client_; |
| 129 blink::scheduler::RendererScheduler* const renderer_scheduler_; // Not owned. | 136 blink::scheduler::RendererScheduler* const renderer_scheduler_; // Not owned. |
| 130 }; | 137 }; |
| 131 | 138 |
| 132 } // namespace content | 139 } // namespace content |
| 133 | 140 |
| 134 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ | 141 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ |
| OLD | NEW |