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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2492793004: Add TimeToScrollUpdateSwapBegin2 in RAPPOR (Closed)
Patch Set: add tests Created 4 years 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/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 6141da6dc17a327adfaad69e89de263e97aec73e..33282e693ef3118b716b7ce635caf5a4f4da0e6b 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -273,6 +273,7 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
is_in_touchpad_gesture_scroll_(false),
is_in_touchscreen_gesture_scroll_(false),
received_paint_after_load_(false),
+ latency_tracker_(),
next_browser_snapshot_id_(1),
owned_by_render_frame_host_(false),
is_focused_(false),
@@ -287,6 +288,7 @@ RenderWidgetHostImpl::RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
weak_factory_(this) {
CHECK(delegate_);
CHECK_NE(MSG_ROUTING_NONE, routing_id_);
+ latency_tracker_.SetDelegate(delegate_);
#if defined(OS_WIN)
// Update the display color profile cache so that it is likely to be up to
@@ -2304,6 +2306,7 @@ void RenderWidgetHostImpl::DelayedAutoResized() {
void RenderWidgetHostImpl::DetachDelegate() {
delegate_ = NULL;
+ latency_tracker_.SetDelegate(nullptr);
}
void RenderWidgetHostImpl::FrameSwapped(const ui::LatencyInfo& latency_info) {
« no previous file with comments | « content/browser/renderer_host/input/render_widget_host_latency_tracker_unittest.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698