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

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

Issue 2678233002: DevTools: track more elements panel user actions (Closed)
Patch Set: cl feedback 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/StylesSidebarPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
index b4ffe1dc32a7e4c7218ed90266c4f3c119e1e02d..7d57125010dd9bb9c41eda6f91909acc22142cf5 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -48,6 +48,7 @@ Elements.StylesSidebarPane = class extends Elements.ElementsSidebarPane {
this._sectionBlocks = [];
Elements.StylesSidebarPane._instance = this;
UI.context.addFlavorChangeListener(SDK.DOMNode, this.forceUpdate, this);
+ this.element.addEventListener('copy', this._clipboardCopy.bind(this));
}
/**
@@ -485,6 +486,13 @@ Elements.StylesSidebarPane = class extends Elements.ElementsSidebarPane {
sections = sections.concat(block.sections);
return sections;
}
+
+ /**
+ * @param {!Event} event
+ */
+ _clipboardCopy(event) {
+ Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleCopied);
+ }
};
Elements.StylesSidebarPane._maxLinkLength = 30;

Powered by Google App Engine
This is Rietveld 408576698