OLD | NEW |
1 /** | 1 /** |
2 * Takes the |moduleListData| input argument which represents data about | 2 * Takes the |moduleListData| input argument which represents data about |
3 * the currently available modules and populates the html jstemplate | 3 * the currently available modules and populates the html jstemplate |
4 * with that data. It expects an object structure like the above. | 4 * with that data. It expects an object structure like the above. |
5 * @param {Object} moduleListData Information about available modules | 5 * @param {Object} moduleListData Information about available modules |
6 */ | 6 */ |
7 function renderTemplate(moduleListData) { | 7 function renderTemplate(moduleListData) { |
8 // This is the javascript code that processes the template: | 8 // This is the javascript code that processes the template: |
9 var input = new JsEvalContext(moduleListData); | 9 var input = new JsEvalContext(moduleListData); |
10 var output = document.getElementById('flashInfoTemplate'); | 10 var output = document.getElementById('naclInfoTemplate'); |
11 jstProcess(input, output); | 11 jstProcess(input, output); |
12 } | 12 } |
13 | 13 |
14 /** | 14 /** |
15 * Asks the C++ FlashUIDOMHandler to get details about the Flash and return | 15 * Asks the C++ NaClUIDOMHandler to get details about the NaCl and return |
16 * the data in returnFlashInfo() (below). | 16 * the data in returnNaClInfo() (below). |
17 */ | 17 */ |
18 function requestFlashInfo() { | 18 function requestNaClInfo() { |
19 chrome.send('requestFlashInfo', []); | 19 chrome.send('requestNaClInfo'); |
20 } | 20 } |
21 | 21 |
22 /** | 22 /** |
23 * Called by the WebUI to re-populate the page with data representing the | 23 * Called by the WebUI to re-populate the page with data representing the |
24 * current state of Flash. | 24 * current state of NaCl. |
| 25 * @param {Object} moduleListData Information about available modules |
25 */ | 26 */ |
26 function returnFlashInfo(moduleListData) { | 27 function returnNaClInfo(moduleListData) { |
27 document.getElementById('loading-message').style.visibility = 'hidden'; | 28 document.getElementById('loading-message').style.visibility = 'hidden'; |
28 document.getElementById('body-container').style.visibility = 'visible'; | 29 document.getElementById('body-container').style.visibility = 'visible'; |
29 renderTemplate(moduleListData); | 30 renderTemplate(moduleListData); |
30 } | 31 } |
31 | 32 |
32 // Get data and have it displayed upon loading. | 33 // Get data and have it displayed upon loading. |
33 document.addEventListener('DOMContentLoaded', requestFlashInfo); | 34 document.addEventListener('DOMContentLoaded', requestNaClInfo); |
34 | |
OLD | NEW |