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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/View.js

Issue 2515763003: DevTools: use shorthand syntax in interface definitions. (Closed)
Patch Set: Created 4 years, 1 month 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @interface 5 * @interface
6 */ 6 */
7 UI.View = function() {}; 7 UI.View = function() {};
8 8
9 UI.View.prototype = { 9 UI.View.prototype = {
10 /** 10 /**
11 * @return {string} 11 * @return {string}
12 */ 12 */
13 viewId: function() {}, 13 viewId() {},
14 14
15 /** 15 /**
16 * @return {string} 16 * @return {string}
17 */ 17 */
18 title: function() {}, 18 title() {},
19 19
20 /** 20 /**
21 * @return {boolean} 21 * @return {boolean}
22 */ 22 */
23 isCloseable: function() {}, 23 isCloseable() {},
24 24
25 /** 25 /**
26 * @return {boolean} 26 * @return {boolean}
27 */ 27 */
28 isTransient: function() {}, 28 isTransient() {},
29 29
30 /** 30 /**
31 * @return {!Promise<!Array<!UI.ToolbarItem>>} 31 * @return {!Promise<!Array<!UI.ToolbarItem>>}
32 */ 32 */
33 toolbarItems: function() {}, 33 toolbarItems() {},
34 34
35 /** 35 /**
36 * @return {!Promise<!UI.Widget>} 36 * @return {!Promise<!UI.Widget>}
37 */ 37 */
38 widget: function() {} 38 widget() {}
39 }; 39 };
40 40
41 UI.View._symbol = Symbol('view'); 41 UI.View._symbol = Symbol('view');
42 UI.View._widgetSymbol = Symbol('widget'); 42 UI.View._widgetSymbol = Symbol('widget');
43 43
44 /** 44 /**
45 * @implements {UI.View} 45 * @implements {UI.View}
46 * @unrestricted 46 * @unrestricted
47 */ 47 */
48 UI.SimpleView = class extends UI.VBox { 48 UI.SimpleView = class extends UI.VBox {
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 209
210 /** 210 /**
211 * @interface 211 * @interface
212 */ 212 */
213 UI.ViewLocation = function() {}; 213 UI.ViewLocation = function() {};
214 214
215 UI.ViewLocation.prototype = { 215 UI.ViewLocation.prototype = {
216 /** 216 /**
217 * @param {string} locationName 217 * @param {string} locationName
218 */ 218 */
219 appendApplicableItems: function(locationName) {}, 219 appendApplicableItems(locationName) {},
220 220
221 /** 221 /**
222 * @param {!UI.View} view 222 * @param {!UI.View} view
223 * @param {?UI.View=} insertBefore 223 * @param {?UI.View=} insertBefore
224 */ 224 */
225 appendView: function(view, insertBefore) {}, 225 appendView(view, insertBefore) {},
226 226
227 /** 227 /**
228 * @param {!UI.View} view 228 * @param {!UI.View} view
229 * @param {?UI.View=} insertBefore 229 * @param {?UI.View=} insertBefore
230 * @return {!Promise} 230 * @return {!Promise}
231 */ 231 */
232 showView: function(view, insertBefore) {}, 232 showView(view, insertBefore) {},
233 233
234 /** 234 /**
235 * @param {!UI.View} view 235 * @param {!UI.View} view
236 */ 236 */
237 removeView: function(view) {}, 237 removeView(view) {},
238 238
239 /** 239 /**
240 * @return {!UI.Widget} 240 * @return {!UI.Widget}
241 */ 241 */
242 widget: function() {} 242 widget() {}
243 }; 243 };
244 244
245 /** 245 /**
246 * @interface 246 * @interface
247 * @extends {UI.ViewLocation} 247 * @extends {UI.ViewLocation}
248 */ 248 */
249 UI.TabbedViewLocation = function() {}; 249 UI.TabbedViewLocation = function() {};
250 250
251 UI.TabbedViewLocation.prototype = { 251 UI.TabbedViewLocation.prototype = {
252 /** 252 /**
253 * @return {!UI.TabbedPane} 253 * @return {!UI.TabbedPane}
254 */ 254 */
255 tabbedPane: function() {}, 255 tabbedPane() {},
256 256
257 enableMoreTabsButton: function() {} 257 enableMoreTabsButton() {}
258 }; 258 };
259 259
260 /** 260 /**
261 * @interface 261 * @interface
262 */ 262 */
263 UI.ViewLocationResolver = function() {}; 263 UI.ViewLocationResolver = function() {};
264 264
265 UI.ViewLocationResolver.prototype = { 265 UI.ViewLocationResolver.prototype = {
266 /** 266 /**
267 * @param {string} location 267 * @param {string} location
268 * @return {?UI.ViewLocation} 268 * @return {?UI.ViewLocation}
269 */ 269 */
270 resolveLocation: function(location) {} 270 resolveLocation(location) {}
271 }; 271 };
272 272
273 /** 273 /**
274 * @unrestricted 274 * @unrestricted
275 */ 275 */
276 UI.ViewManager = class { 276 UI.ViewManager = class {
277 constructor() { 277 constructor() {
278 /** @type {!Map<string, !UI.View>} */ 278 /** @type {!Map<string, !UI.View>} */
279 this._views = new Map(); 279 this._views = new Map();
280 /** @type {!Map<string, string>} */ 280 /** @type {!Map<string, string>} */
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 appendApplicableItems(locationName) { 859 appendApplicableItems(locationName) {
860 for (var view of this._manager._viewsForLocation(locationName)) 860 for (var view of this._manager._viewsForLocation(locationName))
861 this.appendView(view); 861 this.appendView(view);
862 } 862 }
863 }; 863 };
864 864
865 /** 865 /**
866 * @type {!UI.ViewManager} 866 * @type {!UI.ViewManager}
867 */ 867 */
868 UI.viewManager; 868 UI.viewManager;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698