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

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

Issue 2678233002: DevTools: track more elements panel user actions (Closed)
Patch Set: fixup Created 3 years, 9 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 0eb0d410bfe22e7482f82bc6be1f12585c6cfad5..0a4d97862500f44edfb5d198b99775fd635ee065 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -56,6 +56,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));
}
/**
@@ -493,6 +494,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