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

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: Fix creis's comments Created 4 years, 10 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
« no previous file with comments | « content/renderer/idle_user_detector.cc ('k') | content/renderer/input/input_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..71d22f768739b54c496fa892c6465df500eccd53 100644
--- a/content/renderer/input/input_event_filter.h
+++ b/content/renderer/input/input_event_filter.h
@@ -7,12 +7,14 @@
#include <queue>
#include <set>
+#include <unordered_map>
#include "base/callback.h"
#include "base/synchronization/lock.h"
#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/non_blocking_event_queue.h"
#include "ipc/message_filter.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
@@ -40,7 +42,8 @@ class Sender;
namespace content {
class CONTENT_EXPORT InputEventFilter : public InputHandlerManagerClient,
- public IPC::MessageFilter {
+ public IPC::MessageFilter,
+ public NonBlockingEventQueueClient {
public:
InputEventFilter(
const base::Callback<void(const IPC::Message&)>& main_listener,
@@ -66,6 +69,8 @@ class CONTENT_EXPORT InputEventFilter : public InputHandlerManagerClient,
void DidOverscroll(int routing_id,
const DidOverscrollParams& params) override;
void DidStopFlinging(int routing_id) override;
+ void NonBlockingInputEventHandled(int routing_id,
+ blink::WebInputEvent::Type type) override;
// IPC::MessageFilter methods:
void OnFilterAdded(IPC::Sender* sender) override;
@@ -73,6 +78,11 @@ class CONTENT_EXPORT InputEventFilter : public InputHandlerManagerClient,
void OnChannelClosing() override;
bool OnMessageReceived(const IPC::Message& message) override;
+ // NonBlockingEventQueueClient methods:
+ void SendNonBlockingEvent(int routing_id,
+ const blink::WebInputEvent* event,
+ const ui::LatencyInfo& latency) override;
+
private:
~InputEventFilter() override;
@@ -97,6 +107,10 @@ class CONTENT_EXPORT InputEventFilter : public InputHandlerManagerClient,
// Indicates the routing_ids for which input events should be filtered.
std::set<int> routes_;
+ using RouteQueueMap =
+ std::unordered_map<int, scoped_ptr<NonBlockingEventQueue>>;
+ 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
« no previous file with comments | « content/renderer/idle_user_detector.cc ('k') | content/renderer/input/input_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698