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

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

Issue 2343773002: DevTools: Autocomplete class names in ClassesPaneWidget (Closed)
Patch Set: 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..fea1da0dce32fa9756b68fe36cea86bfdc59a44c 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>>}
lushnikov 2016/09/15 17:58:31 let's fulfill with !Array<string>
+ */
+ classNamesPromise: function(styleSheetId)
+ {
+ /**
+ * @param {?string} error
+ * @param {!Array<string>} classNames
+ * @return {?Array<string>}
+ */
+ function classNamesCallback(error, classNames)
+ {
+ return !error && classNames ? classNames : null;
+ }
+ return this._agent.collectClassNames(styleSheetId, classNamesCallback);
+ },
+
+ /**
* @param {!DOMAgent.NodeId} nodeId
* @return {!Promise.<?Map.<string, string>>}
*/

Powered by Google App Engine
This is Rietveld 408576698