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

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

Issue 1861733002: Add touch drag UMA latency metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually fix tests. Created 4 years, 8 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..143832d60c26fff70bf998cee97388f449711cd8 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
@@ -27,18 +27,29 @@ class CONTENT_EXPORT RenderWidgetHostLatencyTracker {
// Called once after the RenderWidgetHost is fully initialized.
void Initialize(int routing_id, int process_id);
+ void ComputeInputLatencyHistograms(blink::WebInputEvent::Type type,
+ int64_t latency_component_id,
+ const ui::LatencyInfo& latency,
+ bool default_prevented);
+
// Populates the LatencyInfo with relevant entries for latency tracking.
// Called when an event is received by the RenderWidgetHost, prior to
// that event being forwarded to the renderer (via the InputRouter).
void OnInputEvent(const blink::WebInputEvent& event,
ui::LatencyInfo* latency);
+ // Populates the LatencyInfo with relevant entries for latency
+ // tracking. Called when an event is about to be forwarded to the renderer.
+ void OnForwardEventToRenderer(const blink::WebInputEvent& event,
+ ui::LatencyInfo* latency);
+
// Populates the LatencyInfo with relevant entries for latency tracking, also
// terminating latency tracking for events that did not trigger rendering and
// performing relevant UMA latency reporting. Called when an event is ack'ed
// to the RenderWidgetHost (from the InputRouter).
void OnInputEventAck(const blink::WebInputEvent& event,
- ui::LatencyInfo* latency);
+ ui::LatencyInfo* latency,
+ bool defaultPrevented);
aelias_OOO_until_Jul13 2016/04/05 18:35:18 I think it might be useful to have a way to break
// Populates renderer-created LatencyInfo entries with the appropriate latency
// component id. Called when the RenderWidgetHost receives a compositor swap
@@ -65,6 +76,12 @@ class CONTENT_EXPORT RenderWidgetHostLatencyTracker {
int64_t latency_component_id_;
float device_scale_factor_;
bool has_seen_first_gesture_scroll_update_;
+ // Whether the current stream of touch events has ever included more than one
+ // touch point.
+ bool multi_finger_gesture_;
+ // Whether the touch start for the current stream of touch events had its
+ // default action prevented. Only valid for single finger gestures.
+ bool touch_start_default_prevented_;
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostLatencyTracker);
};

Powered by Google App Engine
This is Rietveld 408576698