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

Unified Diff: content/renderer/input/input_handler_manager_client.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_client.h
diff --git a/content/renderer/input/input_handler_manager_client.h b/content/renderer/input/input_handler_manager_client.h
index a65ad731cbd3b4c69be40d6d4374cae611ed3379..19e8d2f650683be769e3acdc3b722d5a880b5070 100644
--- a/content/renderer/input/input_handler_manager_client.h
+++ b/content/renderer/input/input_handler_manager_client.h
@@ -11,19 +11,17 @@
#include "content/common/content_export.h"
#include "content/common/input/input_event_ack_state.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
+#include "ui/events/blink/scoped_web_input_event.h"
#include "ui/gfx/geometry/vector2d_f.h"
-namespace ui {
-class LatencyInfo;
-struct DidOverscrollParams;
-}
-
namespace cc {
class InputHandler;
}
namespace ui {
+class LatencyInfo;
class SynchronousInputHandlerProxy;
+struct DidOverscrollParams;
}
namespace content {
@@ -32,13 +30,19 @@ class CONTENT_EXPORT InputHandlerManagerClient {
public:
virtual ~InputHandlerManagerClient() {}
+ using InputEventAckStateCallback =
+ base::Callback<void(InputEventAckState,
+ ui::ScopedWebInputEvent,
+ const ui::LatencyInfo&,
+ std::unique_ptr<ui::DidOverscrollParams>)>;
// The Manager will supply a |handler| when bound to the client. This is valid
// until the manager shuts down, at which point it supplies a null |handler|.
// The client should only makes calls to |handler| on the compositor thread.
- typedef base::Callback<
- InputEventAckState(int /*routing_id*/,
- const blink::WebInputEvent*,
- ui::LatencyInfo* latency_info)> Handler;
+ using Handler =
+ base::Callback<void(int /*routing_id*/,
+ ui::ScopedWebInputEvent,
+ const ui::LatencyInfo& latency_info,
+ const InputEventAckStateCallback& callback)>;
// Called from the main thread.
virtual void SetBoundHandler(const Handler& handler) = 0;
@@ -50,7 +54,8 @@ class CONTENT_EXPORT InputHandlerManagerClient {
virtual void RegisterRoutingID(int routing_id) = 0;
virtual void UnregisterRoutingID(int routing_id) = 0;
virtual void DidOverscroll(int routing_id,
- const ui::DidOverscrollParams& params) = 0;
+ const ui::DidOverscrollParams& params,
+ bool bundle_ack_with_triggering_event) = 0;
virtual void DidStartFlinging(int routing_id) = 0;
virtual void DidStopFlinging(int routing_id) = 0;

Powered by Google App Engine
This is Rietveld 408576698