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 |