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

Unified Diff: content/browser/renderer_host/input/render_widget_host_latency_tracker.h

Issue 1984173002: Log First User Interaction in Page Load Metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Plumbing RWH latency tracker instead of DidGetUserInteraction API Created 4 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
Index: content/browser/renderer_host/input/render_widget_host_latency_tracker.h
diff --git a/content/browser/renderer_host/input/render_widget_host_latency_tracker.h b/content/browser/renderer_host/input/render_widget_host_latency_tracker.h
index 633e4e878da43bb4097739ec8f934ec3c227ffd9..0363e31d8d264c76a2193f884b38e1c7a5b3fdb5 100644
--- a/content/browser/renderer_host/input/render_widget_host_latency_tracker.h
+++ b/content/browser/renderer_host/input/render_widget_host_latency_tracker.h
@@ -60,11 +60,18 @@ class CONTENT_EXPORT RenderWidgetHostLatencyTracker {
// subsystem.
int64_t latency_component_id() const { return latency_component_id_; }
+ // Add/remove a callback that can handle input events routed to latency
+ // tracker.
+ typedef base::Callback<bool(const blink::WebInputEvent&)> InputEventCallback;
+ void AddInputEventCallback(const InputEventCallback& callback);
+ void RemoveInputEventCallback(const InputEventCallback& callback);
+
private:
int64_t last_event_id_;
int64_t latency_component_id_;
float device_scale_factor_;
bool has_seen_first_gesture_scroll_update_;
+ std::vector<InputEventCallback> input_event_callbacks_;
Bryan McQuade 2016/05/25 21:32:30 can you use base::ObserverList here? the comments
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostLatencyTracker);
};

Powered by Google App Engine
This is Rietveld 408576698