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

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: review, copyright, etc. 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 // 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
3 // found in the LICENSE file.
4
5 var nacl = nacl || {};
6
7 (function() {
8 /**
9 * Takes the |moduleListData| input argument which represents data about
10 * the currently available modules and populates the html jstemplate
11 * with that data. It expects an object structure like the above.
12 * @param {Object} moduleListData Information about available modules
13 */
14 function renderTemplate(moduleListData) {
15 // Process the template.
16 var input = new JsEvalContext(moduleListData);
17 var output = $('naclInfoTemplate');
18 jstProcess(input, output);
19 };
20
21 /**
22 * Asks the C++ NaClUIDOMHandler to get details about the NaCl and return
23 * the data in returnNaClInfo() (below).
24 */
25 function requestNaClInfo() {
26 chrome.send('requestNaClInfo');
27 };
28
29 /**
30 * Called by the WebUI to re-populate the page with data representing the
31 * current state of NaCl.
32 * @param {Object} moduleListData Information about available modules
33 */
34 nacl.returnNaClInfo = function(moduleListData) {
35 $('loading-message').hidden = 'hidden';
36 $('body-container').hidden = '';
37 renderTemplate(moduleListData);
38 };
39
40 // Get data and have it displayed upon loading.
41 document.addEventListener('DOMContentLoaded', requestNaClInfo);
42 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/about_nacl.html ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698