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

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

Issue 1631963002: Plumb firing passive event listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners_2a
Patch Set: Set dependency correctly Created 4 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 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 e2d18f398df33958bb04e6d79a8895db0dc4e92a..db690f76a22da17f195d8bd111b52872cd5672fe 100644
--- a/content/renderer/input/input_event_filter.h
+++ b/content/renderer/input/input_event_filter.h
@@ -13,6 +13,7 @@
#include "content/common/content_export.h"
#include "content/common/input/input_event_ack_state.h"
#include "content/renderer/input/input_handler_manager_client.h"
+#include "content/renderer/input/passive_event_queue.h"
#include "ipc/message_filter.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
@@ -40,7 +41,8 @@ class Sender;
namespace content {
class CONTENT_EXPORT InputEventFilter : public InputHandlerManagerClient,
- public IPC::MessageFilter {
+ public IPC::MessageFilter,
+ public PassiveEventQueueClient {
public:
InputEventFilter(
const base::Callback<void(const IPC::Message&)>& main_listener,
@@ -66,6 +68,8 @@ class CONTENT_EXPORT InputEventFilter : public InputHandlerManagerClient,
void DidOverscroll(int routing_id,
const DidOverscrollParams& params) override;
void DidStopFlinging(int routing_id) override;
+ void PassiveInputEventHandled(int routing_id,
+ blink::WebInputEvent::Type type) override;
// IPC::MessageFilter methods:
void OnFilterAdded(IPC::Sender* sender) override;
@@ -73,6 +77,11 @@ class CONTENT_EXPORT InputEventFilter : public InputHandlerManagerClient,
void OnChannelClosing() override;
bool OnMessageReceived(const IPC::Message& message) override;
+ // PassiveEventQueueClient methods:
+ void SendPassiveEvent(int routing_id,
+ const blink::WebInputEvent* event,
+ const ui::LatencyInfo& latency) override;
+
private:
~InputEventFilter() override;
@@ -97,6 +106,9 @@ class CONTENT_EXPORT InputEventFilter : public InputHandlerManagerClient,
// Indicates the routing_ids for which input events should be filtered.
std::set<int> routes_;
+ typedef std::map<int, PassiveEventQueue*> RouteQueueMap;
+ RouteQueueMap route_queues_;
+
// Used to intercept overscroll notifications while an event is being
// dispatched. If the event causes overscroll, the overscroll metadata can be
// bundled in the event ack, saving an IPC. Note that we must continue

Powered by Google App Engine
This is Rietveld 408576698