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

Unified Diff: content/renderer/gpu/input_handler_manager.h

Issue 23364004: Implementation of device metrics emulation in render view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Style Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698