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

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

Issue 2881038: Extension doc changes (nothing buildable or testable) - Add boilerplate line for experimental api... (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: render docs Created 10 years, 5 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
« no previous file with comments | « chrome/common/extensions/docs/index.html ('k') | chrome/common/extensions/docs/manifest.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * @fileoverview This file is the controller for generating extension 2 * @fileoverview This file is the controller for generating extension
3 * doc pages. 3 * doc pages.
4 * 4 *
5 * It expects to have available via XHR (relative path): 5 * It expects to have available via XHR (relative path):
6 * 1) API_TEMPLATE which is the main template for the api pages. 6 * 1) API_TEMPLATE which is the main template for the api pages.
7 * 2) A file located at SCHEMA which is shared with the extension system and 7 * 2) A file located at SCHEMA which is shared with the extension system and
8 * defines the methods and events contained in one api. 8 * defines the methods and events contained in one api.
9 * 3) (Possibly) A static version of the current page url in /static/. I.e. 9 * 3) (Possibly) A static version of the current page url in /static/. I.e.
10 * if called as ../foo.html, it will look for ../static/foo.html. 10 * if called as ../foo.html, it will look for ../static/foo.html.
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 } 366 }
367 367
368 function getModuleName() { 368 function getModuleName() {
369 return "chrome." + module.namespace; 369 return "chrome." + module.namespace;
370 } 370 }
371 371
372 function getFullyQualifiedFunctionName(func) { 372 function getFullyQualifiedFunctionName(func) {
373 return getModuleName() + "." + func.name; 373 return getModuleName() + "." + func.name;
374 } 374 }
375 375
376 function isExperimentalAPIPage() {
377 return (getPageName().indexOf('.experimental.') >= 0 &&
378 getPageName().indexOf('.experimental.*') < 0);
379 }
380
376 function hasCallback(parameters) { 381 function hasCallback(parameters) {
377 return (parameters.length > 0 && 382 return (parameters.length > 0 &&
378 parameters[parameters.length - 1].type == "function"); 383 parameters[parameters.length - 1].type == "function");
379 } 384 }
380 385
381 function getCallbackParameters(parameters) { 386 function getCallbackParameters(parameters) {
382 return parameters[parameters.length - 1]; 387 return parameters[parameters.length - 1];
383 } 388 }
384 389
385 function shouldExpandObject(object) { 390 function shouldExpandObject(object) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 434
430 function sortByName(a, b) { 435 function sortByName(a, b) {
431 if (a.name < b.name) { 436 if (a.name < b.name) {
432 return -1; 437 return -1;
433 } 438 }
434 if (a.name > b.name) { 439 if (a.name > b.name) {
435 return 1; 440 return 1;
436 } 441 }
437 return 0; 442 return 0;
438 } 443 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/index.html ('k') | chrome/common/extensions/docs/manifest.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698