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

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: Fix everything. 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
« no previous file with comments | « no previous file | content/browser/renderer_host/input/render_widget_host_latency_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f86d628d95384ad11d91d2bd8f3de09e9991c527 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
@@ -12,6 +12,7 @@
#include "base/macros.h"
#include "content/browser/renderer_host/event_with_latency_info.h"
#include "content/common/content_export.h"
+#include "content/common/input/input_event_ack_state.h"
#include "ui/events/latency_info.h"
namespace content {
@@ -27,6 +28,11 @@ 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,
+ InputEventAckState ack_result);
+
// 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).
@@ -38,7 +44,8 @@ class CONTENT_EXPORT RenderWidgetHostLatencyTracker {
// 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,
+ InputEventAckState ack_result);
// Populates renderer-created LatencyInfo entries with the appropriate latency
// component id. Called when the RenderWidgetHost receives a compositor swap
@@ -65,6 +72,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);
};
« no previous file with comments | « no previous file | content/browser/renderer_host/input/render_widget_host_latency_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698