OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /** |
6 * @fileoverview This file is the controller for generating extension | 6 * @fileoverview This file is the controller for generating extension |
7 * doc pages. | 7 * doc pages. |
8 * | 8 * |
9 * It expects to have available via XHR (relative path): | 9 * It expects to have available via XHR (relative path): |
10 * 1) API_TEMPLATE which is the main template for the api pages. | 10 * 1) API_TEMPLATE which is the main template for the api pages. |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 } | 425 } |
426 }); | 426 }); |
427 } | 427 } |
428 | 428 |
429 /* | 429 /* |
430 * Template Callout Functions | 430 * Template Callout Functions |
431 * The jstProcess() will call out to these functions from within the page | 431 * The jstProcess() will call out to these functions from within the page |
432 * template | 432 * template |
433 */ | 433 */ |
434 | 434 |
| 435 function filterDocumented(things) { |
| 436 return !things ? [] : things.filter(function(thing) { |
| 437 return !disableDocs(thing); |
| 438 }); |
| 439 } |
| 440 |
435 function stableAPIs() { | 441 function stableAPIs() { |
436 return schema.filter(function(module) { | 442 return schema.filter(function(module) { |
437 return !disableDocs(module) && | 443 return !disableDocs(module) && |
438 module.namespace.indexOf('experimental') < 0; | 444 module.namespace.indexOf('experimental') < 0; |
439 }).map(function(module) { | 445 }).map(function(module) { |
440 return module.namespace; | 446 return module.namespace; |
441 }).sort(); | 447 }).sort(); |
442 } | 448 } |
443 | 449 |
444 function experimentalAPIs() { | 450 function experimentalAPIs() { |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 } | 678 } |
673 if (a.name > b.name) { | 679 if (a.name > b.name) { |
674 return 1; | 680 return 1; |
675 } | 681 } |
676 return 0; | 682 return 0; |
677 } | 683 } |
678 | 684 |
679 function disableDocs(obj) { | 685 function disableDocs(obj) { |
680 return !!obj.nodoc || !!obj.internal; | 686 return !!obj.nodoc || !!obj.internal; |
681 } | 687 } |
OLD | NEW |