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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/CSSParser.js

Issue 1609973002: DevTools: promisify ContentProvider.requestContent and all its clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaseline Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 /** 1 /**
2 * Copyright 2014 The Chromium Authors. All rights reserved. 2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /** 7 /**
8 * @constructor 8 * @constructor
9 * @extends {WebInspector.Object} 9 * @extends {WebInspector.Object}
10 */ 10 */
(...skipping 10 matching lines...) Expand all
21 21
22 WebInspector.CSSParser.prototype = { 22 WebInspector.CSSParser.prototype = {
23 /** 23 /**
24 * @param {!WebInspector.CSSStyleSheetHeader} styleSheetHeader 24 * @param {!WebInspector.CSSStyleSheetHeader} styleSheetHeader
25 * @param {function(!Array.<!WebInspector.CSSParser.Rule>)=} callback 25 * @param {function(!Array.<!WebInspector.CSSParser.Rule>)=} callback
26 */ 26 */
27 fetchAndParse: function(styleSheetHeader, callback) 27 fetchAndParse: function(styleSheetHeader, callback)
28 { 28 {
29 this._lock(); 29 this._lock();
30 this._finishedCallback = callback; 30 this._finishedCallback = callback;
31 styleSheetHeader.requestContent(this._innerParse.bind(this)); 31 styleSheetHeader.requestContent().then(this._innerParse.bind(this));
32 }, 32 },
33 33
34 /** 34 /**
35 * @param {string} text 35 * @param {string} text
36 * @param {function(!Array.<!WebInspector.CSSParser.Rule>)=} callback 36 * @param {function(!Array.<!WebInspector.CSSParser.Rule>)=} callback
37 */ 37 */
38 parse: function(text, callback) 38 parse: function(text, callback)
39 { 39 {
40 this._lock(); 40 this._lock();
41 this._finishedCallback = callback; 41 this._finishedCallback = callback;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 this.nameRange; 158 this.nameRange;
159 /** @type {string} */ 159 /** @type {string} */
160 this.value; 160 this.value;
161 /** @type {!WebInspector.CSSParser.Range} */ 161 /** @type {!WebInspector.CSSParser.Range} */
162 this.valueRange; 162 this.valueRange;
163 /** @type {!WebInspector.CSSParser.Range} */ 163 /** @type {!WebInspector.CSSParser.Range} */
164 this.range; 164 this.range;
165 /** @type {(boolean|undefined)} */ 165 /** @type {(boolean|undefined)} */
166 this.disabled; 166 this.disabled;
167 } 167 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698