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

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js

Issue 2678233002: DevTools: track more elements panel user actions (Closed)
Patch Set: ' Created 3 years, 10 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: third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js b/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js
index adc793d4f02e12b9679c73c0585e5405dfa534c7..110cf2fdb7b3dfd02459dc489aadf65eb2db4778 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeOutline.js
@@ -74,6 +74,7 @@ Elements.ElementsTreeOutline = class extends UI.TreeOutline {
this._selectedDOMNode = null;
this._visible = false;
+ this._shouldReportSelectedNodeChangedUMA = false;
this._popoverHelper = new UI.PopoverHelper(this._element);
this._popoverHelper.initializeCallbacks(this._getPopoverAnchor.bind(this), this._showPopover.bind(this));
@@ -394,6 +395,11 @@ Elements.ElementsTreeOutline = class extends UI.TreeOutline {
* @param {boolean} focus
*/
_selectedNodeChanged(focus) {
+ // Don't want to track first time selecting node because user may
+ // just be trying to open DevTools with "Inspect"
+ if (this._shouldReportSelectedNodeChangedUMA)
+ Host.userMetrics.actionTaken(Host.UserMetrics.Action.ChangeInspectedNodeInElementsPanel);
+ this._shouldReportSelectedNodeChangedUMA = true;
this.dispatchEventToListeners(
Elements.ElementsTreeOutline.Events.SelectedNodeChanged, {node: this._selectedDOMNode, focus: focus});
}

Powered by Google App Engine
This is Rietveld 408576698