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

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

Issue 15927023: Explicit interface for synchronous InputHandlerProxy input handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shorter names ftw Created 7 years, 7 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 | « no previous file | content/renderer/gpu/input_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/input_event_filter.h
diff --git a/content/renderer/gpu/input_event_filter.h b/content/renderer/gpu/input_event_filter.h
index 9e9481936f2d801c444b9e28c63b6ae68df28973..693aefa9e575b2a1800e654937e950d4b3702bb3 100644
--- a/content/renderer/gpu/input_event_filter.h
+++ b/content/renderer/gpu/input_event_filter.h
@@ -28,22 +28,19 @@ namespace content {
class CONTENT_EXPORT InputEventFilter
: public IPC::ChannelProxy::MessageFilter {
public:
- typedef base::Callback<void(int /*routing_id*/,
- const WebKit::WebInputEvent*)> Handler;
+ typedef base::Callback<InputEventAckState(
+ int /*routing_id*/,
+ const WebKit::WebInputEvent*)> Handler;
// The |handler| is invoked on the thread associated with |target_loop| to
- // handle input events matching the filtered routes. In response, the
- // handler should call either DidHandleInputEvent or DidNotHandleInputEvent.
- // These may be called asynchronously to the handler invocation, but they
- // must be called on the target thread.
+ // handle input events matching the filtered routes.
//
- // If DidNotHandleInputEvent is called with send_to_widget set to true, then
+ // If INPUT_EVENT_ACK_STATE_NOT_CONSUMED is returned by the handler,
// the original InputMsg_HandleInputEvent message will be delivered to
// |main_listener| on the main thread. (The "main thread" in this context is
- // the thread where the InputEventFilter was constructed.) If send_to_widget
- // is true, then a InputHostMsg_HandleInputEvent_ACK will not be
- // generated, leaving that responsibility up to the eventual handler on the
- // main thread.
+ // the thread where the InputEventFilter was constructed.) The responsibility
+ // is left to the eventual handler to deliver the corresponding
+ // InputHostMsg_HandleInputEvent_ACK.
//
InputEventFilter(IPC::Listener* main_listener,
const scoped_refptr<base::MessageLoopProxy>& target_loop,
@@ -53,10 +50,6 @@ class CONTENT_EXPORT InputEventFilter
void AddRoute(int routing_id);
void RemoveRoute(int routing_id);
- // Called on the target thread by the Handler.
- void DidHandleInputEvent();
- void DidNotHandleInputEvent(bool send_to_widget);
-
// IPC::ChannelProxy::MessageFilter methods:
virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
virtual void OnFilterRemoved() OVERRIDE;
@@ -86,7 +79,6 @@ class CONTENT_EXPORT InputEventFilter
// The handler_ only gets Run on the thread corresponding to target_loop_.
scoped_refptr<base::MessageLoopProxy> target_loop_;
Handler handler_;
- std::queue<IPC::Message> messages_;
// Protects access to routes_.
base::Lock routes_lock_;
« no previous file with comments | « no previous file | content/renderer/gpu/input_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698