Commit 42203ef1 authored by Sadrul Habib Chowdhury's avatar Sadrul Habib Chowdhury Committed by Commit Bot

tab-switching: Always measure the tab-switch request delay.

Tab-switch requests that are made through devtools for telemetry tests
are not treated as user-gesture. So this metric can not reported in
telemetry tests. However, the cost of this function is not directly
related to the user-gesture itself. So always report this metric and
associated trace event. This allows this to be measured and monitored
in telemetry tests.

BUG=858944

Change-Id: Ib7112b4939c44af099ecfb751fe108bbe8ecec86
Reviewed-on: https://chromium-review.googlesource.com/1152888Reviewed-by: default avatarMichael Wasserman <msw@chromium.org>
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578659}
parent fcd9cb5b
......@@ -1445,10 +1445,8 @@ void TabStripModel::NotifyIfActiveTabChanged(WebContents* old_contents,
return;
content::RenderWidgetHost* track_host = nullptr;
if (notify_types == Notify::kUserGesture &&
new_contents->GetRenderWidgetHostView()) {
if (new_contents->GetRenderWidgetHostView())
track_host = new_contents->GetRenderWidgetHostView()->GetRenderWidgetHost();
}
RenderWidgetHostVisibilityTracker tracker(track_host);
int reason = notify_types == Notify::kUserGesture
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment