Chromium Code Reviews| 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 14 matching lines...) Expand all Loading... | |
| 25 '../api/browser_action.json', | 25 '../api/browser_action.json', |
| 26 '../api/browsing_data.json', | 26 '../api/browsing_data.json', |
| 27 '../api/chrome_auth_private.json', | 27 '../api/chrome_auth_private.json', |
| 28 '../api/chromeos_info_private.json', | 28 '../api/chromeos_info_private.json', |
| 29 '../api/content_settings.json', | 29 '../api/content_settings.json', |
| 30 '../api/context_menus.json', | 30 '../api/context_menus.json', |
| 31 '../api/cookies.json', | 31 '../api/cookies.json', |
| 32 '../api/debugger.json', | 32 '../api/debugger.json', |
| 33 '../api/declarative_web_request.json', | 33 '../api/declarative_web_request.json', |
| 34 '../api/devtools.json', | 34 '../api/devtools.json', |
| 35 '../api/downloads.json', // autogenerated | |
| 35 '../api/events.json', | 36 '../api/events.json', |
| 36 '../api/experimental_accessibility.json', | 37 '../api/experimental_accessibility.json', |
| 37 '../api/experimental_app.json', | 38 '../api/experimental_app.json', |
| 38 '../api/experimental_bookmark_manager.json', | 39 '../api/experimental_bookmark_manager.json', |
| 39 '../api/experimental_discovery.json', // autogenerated | 40 '../api/experimental_discovery.json', // autogenerated |
| 40 '../api/experimental_downloads.json', | |
| 41 '../api/experimental_font_settings.json', | 41 '../api/experimental_font_settings.json', |
| 42 '../api/experimental_identity.json', | 42 '../api/experimental_identity.json', |
| 43 '../api/experimental_infobars.json', | 43 '../api/experimental_infobars.json', |
| 44 '../api/experimental_input_virtual_keyboard.json', | 44 '../api/experimental_input_virtual_keyboard.json', |
| 45 '../api/experimental_keybinding.json', | 45 '../api/experimental_keybinding.json', |
| 46 '../api/experimental_media_galleries.json', | 46 '../api/experimental_media_galleries.json', |
| 47 '../api/experimental_offscreen_tabs.json', | 47 '../api/experimental_offscreen_tabs.json', |
| 48 '../api/experimental_processes.json', | 48 '../api/experimental_processes.json', |
| 49 '../api/experimental_rlz.json', | 49 '../api/experimental_rlz.json', |
| 50 '../api/experimental_speech_input.json', | 50 '../api/experimental_speech_input.json', |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 280 function renderTemplate() { | 280 function renderTemplate() { |
| 281 schema.forEach(function(mod) { | 281 schema.forEach(function(mod) { |
| 282 if (mod.namespace == pageBase) { | 282 if (mod.namespace == pageBase) { |
| 283 // Do not render page for modules which have documentation disabled. | 283 // Do not render page for modules which have documentation disabled. |
| 284 if (disableDocs(mod)) | 284 if (disableDocs(mod)) |
| 285 return; | 285 return; |
| 286 // This page is an api page. Setup types and apiDefinition. | 286 // This page is an api page. Setup types and apiDefinition. |
| 287 module = mod; | 287 module = mod; |
| 288 apiModuleName = API_MODULE_PREFIX + module.namespace; | 288 apiModuleName = API_MODULE_PREFIX + module.namespace; |
| 289 pageData.apiDefinition = module; | 289 pageData.apiDefinition = module; |
| 290 | |
| 291 if (mod.description && mod.description != '') | |
| 292 document.getElementById('static').innerHTML = mod.description; | |
|
not at google - send to devlin
2012/06/04 04:16:49
See my comment in the IDL file for why I think thi
benjhayden
2012/06/04 20:33:15
Done.
| |
| 290 } | 293 } |
| 291 | 294 |
| 292 if (mod.types) { | 295 if (mod.types) { |
| 293 mod.types.forEach(function(type) { | 296 mod.types.forEach(function(type) { |
| 294 typeModule[type.id] = mod; | 297 typeModule[type.id] = mod; |
| 295 }); | 298 }); |
| 296 } | 299 } |
| 297 }); | 300 }); |
| 298 | 301 |
| 299 /** | 302 /** |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 759 } | 762 } |
| 760 if (a.name > b.name) { | 763 if (a.name > b.name) { |
| 761 return 1; | 764 return 1; |
| 762 } | 765 } |
| 763 return 0; | 766 return 0; |
| 764 } | 767 } |
| 765 | 768 |
| 766 function disableDocs(obj) { | 769 function disableDocs(obj) { |
| 767 return !!obj.nodoc; | 770 return !!obj.nodoc; |
| 768 } | 771 } |
| OLD | NEW |