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

Side by Side Diff: chrome/common/extensions/docs/js/api_page_generator.js

Issue 9452019: experimental.downloads extension api docs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698