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

Side by Side Diff: content/browser/renderer_host/input/render_widget_host_latency_tracker.h

Issue 2888153002: Add TimeToScrollUpdateSwapBegin2 to UKM (Closed)
Patch Set: Rebase and use new constructs Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H _ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H _
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H _ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKER_H _
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 // Returns the ID that uniquely describes this component to the latency 65 // Returns the ID that uniquely describes this component to the latency
66 // subsystem. 66 // subsystem.
67 int64_t latency_component_id() const { return latency_component_id_; } 67 int64_t latency_component_id() const { return latency_component_id_; }
68 68
69 // A delegate is used to get the url to be stored in Rappor Sample. 69 // A delegate is used to get the url to be stored in Rappor Sample.
70 // If delegate is null no Rappor sample will be reported. 70 // If delegate is null no Rappor sample will be reported.
71 void SetDelegate(RenderWidgetHostDelegate*); 71 void SetDelegate(RenderWidgetHostDelegate*);
72 72
73 private: 73 private:
74 int32_t GetUkmSourceId();
75
74 // ui::LatencyTracker: 76 // ui::LatencyTracker:
75 void ReportRapporScrollLatency( 77 void ReportRapporScrollLatency(
76 const std::string& name, 78 const std::string& name,
77 const ui::LatencyInfo::LatencyComponent& start_component, 79 const ui::LatencyInfo::LatencyComponent& start_component,
78 const ui::LatencyInfo::LatencyComponent& end_component) override; 80 const ui::LatencyInfo::LatencyComponent& end_component) override;
79 81
82 // ui::LatencyTracker:
83 void ReportUkmScrollLatency(
84 const std::string& name,
85 const ui::LatencyInfo::LatencyComponent& start_component,
86 const ui::LatencyInfo::LatencyComponent& end_component) override;
87
80 int64_t last_event_id_; 88 int64_t last_event_id_;
81 int64_t latency_component_id_; 89 int64_t latency_component_id_;
82 float device_scale_factor_; 90 float device_scale_factor_;
83 bool has_seen_first_gesture_scroll_update_; 91 bool has_seen_first_gesture_scroll_update_;
84 // Whether the current stream of touch events includes more than one active 92 // Whether the current stream of touch events includes more than one active
85 // touch point. This is set in OnInputEvent, and cleared in OnInputEventAck. 93 // touch point. This is set in OnInputEvent, and cleared in OnInputEventAck.
86 bool active_multi_finger_gesture_; 94 bool active_multi_finger_gesture_;
87 // Whether the touch start for the current stream of touch events had its 95 // Whether the touch start for the current stream of touch events had its
88 // default action prevented. Only valid for single finger gestures. 96 // default action prevented. Only valid for single finger gestures.
89 bool touch_start_default_prevented_; 97 bool touch_start_default_prevented_;
90 98
91 RenderWidgetHostDelegate* render_widget_host_delegate_; 99 RenderWidgetHostDelegate* render_widget_host_delegate_;
92 100
93 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostLatencyTracker); 101 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostLatencyTracker);
94 }; 102 };
95 103
96 } // namespace content 104 } // namespace content
97 105
98 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKE R_H_ 106 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_RENDER_WIDGET_HOST_LATENCY_TRACKE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698