Index: content/renderer/gpu/input_handler_manager.h |
=================================================================== |
--- content/renderer/gpu/input_handler_manager.h (revision 221161) |
+++ content/renderer/gpu/input_handler_manager.h (working copy) |
@@ -30,6 +30,16 @@ |
class InputHandlerWrapper; |
class InputHandlerManagerClient; |
+// InputEventRewriter class allows client to rewrite incoming input events |
aelias_OOO_until_Jul13
2013/09/13 23:51:44
I don't see why you need this on the impl-thread s
dgozman
2013/09/14 07:42:42
Doesn't main thread get events through regular ren
dgozman
2013/09/19 10:17:11
This is removed.
|
+// before passing them to the handler. |
+class InputEventRewriter { |
+ public: |
+ virtual ~InputEventRewriter() {} |
+ |
+ virtual WebKit::WebInputEvent* RewriteInputEvent( |
+ const WebKit::WebInputEvent* event) = 0; |
+}; |
+ |
// InputHandlerManager class manages InputHandlerProxy instances for |
// the WebViews in this renderer. |
class InputHandlerManager { |
@@ -47,6 +57,11 @@ |
const base::WeakPtr<cc::InputHandler>& input_handler, |
const base::WeakPtr<RenderViewImpl>& render_view_impl); |
+ // Callable from the main thread only. This takes ownership of rewriter and |
+ // uses it later on compositor's thread. |
+ void SetInputEventRewriter(int routing_id, |
+ scoped_ptr<InputEventRewriter> rewriter); |
+ |
// Callback only from the compositor's thread. |
void RemoveInputHandler(int routing_id); |
@@ -65,6 +80,9 @@ |
const scoped_refptr<base::MessageLoopProxy>& main_loop, |
const base::WeakPtr<cc::InputHandler>& input_handler, |
const base::WeakPtr<RenderViewImpl>& render_view_impl); |
+ void SetInputEventRewriterOnCompositorThread( |
+ int routing_id, |
+ scoped_ptr<InputEventRewriter> rewriter); |
typedef std::map<int, // routing_id |
scoped_refptr<InputHandlerWrapper> > InputHandlerMap; |