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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js

Issue 2343773002: DevTools: Autocomplete class names in ClassesPaneWidget (Closed)
Patch Set: Reviewed Created 4 years, 3 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/sdk/CSSModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js
index 0a10c72cb5445a7852105235bdf23cceb0f928ca..f89de9a131d36e5ce1d87e5b1bc56711cd73f0c4 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/CSSModel.js
@@ -534,6 +534,24 @@ WebInspector.CSSModel.prototype = {
},
/**
+ * @param {!CSSAgent.StyleSheetId} styleSheetId
+ * @return {!Promise<!Array<string>>}
+ */
+ classNamesPromise: function(styleSheetId)
+ {
+ /**
+ * @param {?string} error
+ * @param {?Array<string>} classNames
+ * @return {!Array<string>}
+ */
+ function classNamesCallback(error, classNames)
+ {
+ return !error && classNames ? classNames : [];
+ }
+ return this._agent.collectClassNames(styleSheetId, classNamesCallback);
+ },
+
+ /**
* @param {!DOMAgent.NodeId} nodeId
* @return {!Promise.<?Map.<string, string>>}
*/

Powered by Google App Engine
This is Rietveld 408576698