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

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

Issue 2265393002: Refactor compositor event handling path to be callback-based (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_handler_manager.h
diff --git a/content/renderer/input/input_handler_manager.h b/content/renderer/input/input_handler_manager.h
index 060f7c58caf13a371144b179e09b88a4a65ce25c..bcf94d698ad618d11804a06420a555876468c8b5 100644
--- a/content/renderer/input/input_handler_manager.h
+++ b/content/renderer/input/input_handler_manager.h
@@ -10,7 +10,9 @@
#include "base/memory/weak_ptr.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/render_view_impl.h"
+#include "ui/events/blink/input_handler_proxy.h"
namespace base {
class SingleThreadTaskRunner;
@@ -40,8 +42,6 @@ namespace content {
class InputHandlerWrapper;
class SynchronousInputHandlerProxyClient;
-class InputHandlerManagerClient;
-struct DidOverscrollParams;
// InputHandlerManager class manages InputHandlerProxy instances for
// the WebViews in this renderer.
@@ -79,14 +79,18 @@ class CONTENT_EXPORT InputHandlerManager {
// Callback only from the compositor's thread.
void RemoveInputHandler(int routing_id);
+ using InputEventAckStateCallback =
+ InputHandlerManagerClient::InputEventAckStateCallback;
// Called from the compositor's thread.
- virtual InputEventAckState HandleInputEvent(
- int routing_id,
- const blink::WebInputEvent* input_event,
- ui::LatencyInfo* latency_info);
+ virtual void HandleInputEvent(int routing_id,
+ ui::ScopedWebInputEvent input_event,
+ const ui::LatencyInfo& latency_info,
+ const InputEventAckStateCallback& callback);
// Called from the compositor's thread.
- void DidOverscroll(int routing_id, const ui::DidOverscrollParams& params);
+ void DidOverscroll(int routing_id,
dtapuska 2016/08/23 19:34:10 I find this DidOverscroll vs DidHandleInputEvent c
chongz 2016/08/23 23:40:33 I've also updated the design doc (@chromium) which
+ const ui::DidOverscrollParams& params,
+ bool bundle_ack_with_triggering_event);
// Called from the compositor's thread.
void DidStartFlinging(int routing_id);
@@ -117,6 +121,14 @@ class CONTENT_EXPORT InputHandlerManager {
const blink::WebGestureEvent& gesture_event,
const cc::InputHandlerScrollResult& scroll_result);
+ using EventDisposition = ui::InputHandlerProxy::EventDisposition;
+ void DidHandleInputEvent(
+ const InputEventAckStateCallback& callback,
+ EventDisposition event_disposition,
+ ui::ScopedWebInputEvent input_event,
+ const ui::LatencyInfo& latency_info,
+ std::unique_ptr<ui::DidOverscrollParams> overscroll_params);
+
typedef base::ScopedPtrHashMap<int, // routing_id
std::unique_ptr<InputHandlerWrapper>>
InputHandlerMap;

Powered by Google App Engine
This is Rietveld 408576698