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

Side by Side Diff: chrome/browser/resources/about_nacl.js

Issue 10823214: Add a chrome://nacl page to show if NaCl is enabled and if PNaCl is installed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: typo Created 8 years, 4 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
(Empty)
1 var nacl = nacl || {};
James Hawkins 2012/08/11 19:21:07 This is still dangerous in that these methods may
jvoung (off chromium) 2012/08/13 22:15:43 Sorry a bit of a JS noob, so may be doing it wrong
2
3 /**
4 * Takes the |moduleListData| input argument which represents data about
5 * the currently available modules and populates the html jstemplate
6 * with that data. It expects an object structure like the above.
7 * @param {Object} moduleListData Information about available modules
8 */
9 nacl.renderTemplate = function(moduleListData) {
10 // Process the template.
11 var input = new JsEvalContext(moduleListData);
12 var output = $('naclInfoTemplate');
13 jstProcess(input, output);
14 };
15
16 /**
17 * Asks the C++ NaClUIDOMHandler to get details about the NaCl and return
18 * the data in returnNaClInfo() (below).
19 */
20 nacl.requestNaClInfo = function() {
21 chrome.send('requestNaClInfo');
22 };
23
24 /**
25 * Called by the WebUI to re-populate the page with data representing the
26 * current state of NaCl.
27 * @param {Object} moduleListData Information about available modules
28 */
29 nacl.returnNaClInfo = function(moduleListData) {
30 $('loading-message').hidden = 'hidden';
31 $('body-container').hidden = '';
32 nacl.renderTemplate(moduleListData);
33 };
34
35 // Get data and have it displayed upon loading.
36 document.addEventListener('DOMContentLoaded', nacl.requestNaClInfo);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698