Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: content/renderer/input/input_handler_manager.h

Issue 2479663002: Move compositor InputHandler from RenderViewImpl to RenderWidget. (Closed)
Patch Set: Rebase to master@{#445291}. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <unordered_map> 8 #include <unordered_map>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 InputHandlerManager( 55 InputHandlerManager(
56 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 56 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
57 InputHandlerManagerClient* client, 57 InputHandlerManagerClient* client,
58 SynchronousInputHandlerProxyClient* sync_handler_client, 58 SynchronousInputHandlerProxyClient* sync_handler_client,
59 blink::scheduler::RendererScheduler* renderer_scheduler); 59 blink::scheduler::RendererScheduler* renderer_scheduler);
60 virtual ~InputHandlerManager(); 60 virtual ~InputHandlerManager();
61 61
62 // Callable from the main thread only. 62 // Callable from the main thread only.
63 void AddInputHandler(int routing_id, 63 void AddInputHandler(int routing_id,
64 const base::WeakPtr<cc::InputHandler>& input_handler, 64 const base::WeakPtr<cc::InputHandler>& input_handler,
65 const base::WeakPtr<RenderViewImpl>& render_view_impl, 65 const base::WeakPtr<RenderWidget>& render_widget,
66 bool enable_smooth_scrolling); 66 bool enable_smooth_scrolling);
67 67
68 void RegisterRoutingID(int routing_id); 68 void RegisterRoutingID(int routing_id);
69 void UnregisterRoutingID(int routing_id); 69 void UnregisterRoutingID(int routing_id);
70 70
71 void ObserveGestureEventAndResultOnMainThread( 71 void ObserveGestureEventAndResultOnMainThread(
72 int routing_id, 72 int routing_id,
73 const blink::WebGestureEvent& gesture_event, 73 const blink::WebGestureEvent& gesture_event,
74 const cc::InputHandlerScrollResult& scroll_result); 74 const cc::InputHandlerScrollResult& scroll_result);
75 75
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 int routing_id, 109 int routing_id,
110 blink::WebScopedInputEvent event, 110 blink::WebScopedInputEvent event,
111 const ui::LatencyInfo& latency_info); 111 const ui::LatencyInfo& latency_info);
112 112
113 private: 113 private:
114 // Called from the compositor's thread. 114 // Called from the compositor's thread.
115 void AddInputHandlerOnCompositorThread( 115 void AddInputHandlerOnCompositorThread(
116 int routing_id, 116 int routing_id,
117 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner, 117 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner,
118 const base::WeakPtr<cc::InputHandler>& input_handler, 118 const base::WeakPtr<cc::InputHandler>& input_handler,
119 const base::WeakPtr<RenderViewImpl>& render_view_impl, 119 const base::WeakPtr<RenderWidget>& render_widget,
120 bool enable_smooth_scrolling); 120 bool enable_smooth_scrolling);
121 121
122 void RegisterRoutingIDOnCompositorThread(int routing_id); 122 void RegisterRoutingIDOnCompositorThread(int routing_id);
123 void UnregisterRoutingIDOnCompositorThread(int routing_id); 123 void UnregisterRoutingIDOnCompositorThread(int routing_id);
124 124
125 void ObserveWheelEventAndResultOnCompositorThread( 125 void ObserveWheelEventAndResultOnCompositorThread(
126 int routing_id, 126 int routing_id,
127 const blink::WebMouseWheelEvent& wheel_event, 127 const blink::WebMouseWheelEvent& wheel_event,
128 const cc::InputHandlerScrollResult& scroll_result); 128 const cc::InputHandlerScrollResult& scroll_result);
129 129
(...skipping 19 matching lines...) Expand all
149 // May be null. 149 // May be null.
150 SynchronousInputHandlerProxyClient* const synchronous_handler_proxy_client_; 150 SynchronousInputHandlerProxyClient* const synchronous_handler_proxy_client_;
151 blink::scheduler::RendererScheduler* const renderer_scheduler_; // Not owned. 151 blink::scheduler::RendererScheduler* const renderer_scheduler_; // Not owned.
152 152
153 base::WeakPtrFactory<InputHandlerManager> weak_ptr_factory_; 153 base::WeakPtrFactory<InputHandlerManager> weak_ptr_factory_;
154 }; 154 };
155 155
156 } // namespace content 156 } // namespace content
157 157
158 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_ 158 #endif // CONTENT_RENDERER_INPUT_INPUT_HANDLER_MANAGER_H_
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | content/renderer/input/input_handler_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698