OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 /** |
5 * @return {!Promise<!ProductRegistry.Registry>} | 6 * @return {!Promise<!ProductRegistry.Registry>} |
6 */ | 7 */ |
7 ProductRegistry.instance = function() { | 8 ProductRegistry.instance = function() { |
8 return self.runtime.extension(ProductRegistry.Registry).instance(); | 9 return self.runtime.extension(ProductRegistry.Registry).instance(); |
9 }; | 10 }; |
10 | 11 |
11 /** | 12 /** |
12 * @interface | 13 * @interface |
13 */ | 14 */ |
14 ProductRegistry.Registry = function() {}; | 15 ProductRegistry.Registry = function() {}; |
15 | 16 |
16 ProductRegistry.Registry.prototype = { | 17 ProductRegistry.Registry.prototype = { |
18 | |
dgozman
2017/05/12 23:23:56
nit: extra empty lines
| |
17 /** | 19 /** |
18 * @param {!Common.ParsedURL} parsedUrl | 20 * @param {!Common.ParsedURL} parsedUrl |
19 * @return {?string} | 21 * @return {?string} |
20 */ | 22 */ |
21 nameForUrl: function(parsedUrl) {}, | 23 nameForUrl: function(parsedUrl) {}, |
22 | 24 |
23 /** | 25 /** |
24 * @param {!Common.ParsedURL} parsedUrl | 26 * @param {!Common.ParsedURL} parsedUrl |
25 * @return {?ProductRegistry.Registry.ProductEntry} | 27 * @return {?ProductRegistry.Registry.ProductEntry} |
26 */ | 28 */ |
27 entryForUrl: function(parsedUrl) {}, | 29 entryForUrl: function(parsedUrl) {}, |
28 | 30 |
29 /** | 31 /** |
30 * @param {!Common.ParsedURL} parsedUrl | 32 * @param {!Common.ParsedURL} parsedUrl |
31 * @return {?number} | 33 * @return {?number} |
32 */ | 34 */ |
33 typeForUrl: function(parsedUrl) {} | 35 typeForUrl: function(parsedUrl) {} |
34 }; | 36 }; |
35 | 37 |
36 /** @typedef {!{name: string, type: ?number}} */ | 38 /** @typedef {!{name: string, type: ?number}} */ |
37 ProductRegistry.Registry.ProductEntry; | 39 ProductRegistry.Registry.ProductEntry; |
OLD | NEW |