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

Unified Diff: content/renderer/input/input_event_filter.h

Issue 2166703003: Implement Main Thread RAF Aligned Input (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_main_thread_queue
Patch Set: Fix build Created 4 years, 4 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/input/input_event_filter.h
diff --git a/content/renderer/input/input_event_filter.h b/content/renderer/input/input_event_filter.h
index 6ebe7f42515ef04d75f99605450120e56620fc16..b32752dcfdfe1e3346428a781e63321a2727ace0 100644
--- a/content/renderer/input/input_event_filter.h
+++ b/content/renderer/input/input_event_filter.h
@@ -36,8 +36,9 @@ class Sender;
// and have them be delivered to a target thread. Input events are filtered
// based on routing_id (see AddRoute and RemoveRoute).
//
-// The user of this class provides an instance of InputEventFilter::Handler,
-// which will be passed WebInputEvents on the target thread.
+// The user of this class provides an instance of InputHandlerManager via
+// |SetInputHandlerManager| which will be called back when processing
+// WebInputEvents on the target thread.
//
namespace content {
@@ -61,7 +62,7 @@ class CONTENT_EXPORT InputEventFilter : public InputHandlerManagerClient,
// is left to the eventual handler to deliver the corresponding
// InputHostMsg_HandleInputEvent_ACK.
//
- void SetBoundHandler(const Handler& handler) override;
+ void SetInputHandlerManager(InputHandlerManager*) override;
void RegisterRoutingID(int routing_id) override;
void UnregisterRoutingID(int routing_id) override;
void DidOverscroll(int routing_id,
@@ -71,6 +72,7 @@ class CONTENT_EXPORT InputEventFilter : public InputHandlerManagerClient,
void NotifyInputEventHandled(int routing_id,
blink::WebInputEvent::Type type,
InputEventAckState ack_result) override;
+ void ProcessRafAlignedInput(int routing_id) override;
// IPC::MessageFilter methods:
void OnFilterAdded(IPC::Sender* sender) override;
@@ -91,6 +93,8 @@ class CONTENT_EXPORT InputEventFilter : public InputHandlerManagerClient,
InputEventAckState ack_result,
uint32_t touch_event_id) override;
+ void NeedsMainFrame(int routing_id) override;
+
private:
~InputEventFilter() override;
@@ -106,9 +110,10 @@ class CONTENT_EXPORT InputEventFilter : public InputHandlerManagerClient,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
IPC::Sender* sender_;
- // The handler_ only gets Run on the thread corresponding to target_loop_.
+ // The |input_handler_manager_| should outlive the life of this class and
tdresser 2016/08/25 14:38:41 "outlive the life of" -> outlive
dtapuska 2016/08/25 15:01:35 Done.
+ // should only be called back on the |target_task_runner_|.
scoped_refptr<base::SingleThreadTaskRunner> target_task_runner_;
- Handler handler_;
+ InputHandlerManager* input_handler_manager_;
// Protects access to routes_.
base::Lock routes_lock_;

Powered by Google App Engine
This is Rietveld 408576698