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

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

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 * This variable structure is here to document the structure that the template 6 * This variable structure is here to document the structure that the template
7 * expects to correctly populate the page. 7 * expects to correctly populate the page.
8 */ 8 */
9 var moduleListDataFormat = { 9 var moduleListDataFormat = {
10 'moduleList': [ 10 'moduleList': [{
11 {
12 'type': 'The type of module found', 11 'type': 'The type of module found',
13 'type_description': 12 'type_description':
14 'The type of module (string), defaults to blank for regular modules', 13 'The type of module (string), defaults to blank for regular modules',
15 'status': 'The module status', 14 'status': 'The module status',
16 'location': 'The module path, not including filename', 15 'location': 'The module path, not including filename',
17 'name': 'The name of the module', 16 'name': 'The name of the module',
18 'product_name': 'The name of the product the module belongs to', 17 'product_name': 'The name of the product the module belongs to',
19 'description': 'The module description', 18 'description': 'The module description',
20 'version': 'The module version', 19 'version': 'The module version',
21 'digital_signer': 'The signer of the digital certificate for the module', 20 'digital_signer': 'The signer of the digital certificate for the module',
22 'recommended_action': 'The help tips bitmask', 21 'recommended_action': 'The help tips bitmask',
23 'possible_resolution': 'The help tips in string form', 22 'possible_resolution': 'The help tips in string form',
24 'help_url': 'The link to the Help Center article' 23 'help_url': 'The link to the Help Center article'
25 } 24 }]
26 ]
27 }; 25 };
28 26
29 /** 27 /**
30 * Takes the |moduleListData| input argument which represents data about 28 * Takes the |moduleListData| input argument which represents data about
31 * the currently available modules and populates the html jstemplate 29 * the currently available modules and populates the html jstemplate
32 * with that data. It expects an object structure like the above. 30 * with that data. It expects an object structure like the above.
33 * @param {Object} moduleListData Information about available modules. 31 * @param {Object} moduleListData Information about available modules.
34 */ 32 */
35 function renderTemplate(moduleListData) { 33 function renderTemplate(moduleListData) {
36 // This is the javascript code that processes the template: 34 // This is the javascript code that processes the template:
37 var input = new JsEvalContext(moduleListData); 35 var input = new JsEvalContext(moduleListData);
38 var output = $('modulesTemplate'); 36 var output = $('modulesTemplate');
39 jstProcess(input, output); 37 jstProcess(input, output);
40 } 38 }
41 39
42 /** 40 /**
43 * Asks the C++ ConflictsDOMHandler to get details about the available modules 41 * Asks the C++ ConflictsDOMHandler to get details about the available modules
44 * and return detailed data about the configuration. The ConflictsDOMHandler 42 * and return detailed data about the configuration. The ConflictsDOMHandler
45 * should reply to returnModuleList() (below). 43 * should reply to returnModuleList() (below).
46 */ 44 */
47 function requestModuleListData() { 45 function requestModuleListData() {
48 chrome.send('requestModuleList'); 46 chrome.send('requestModuleList');
49 } 47 }
50 48
51 /** 49 /**
52 * Called by the WebUI to re-populate the page with data representing the 50 * Called by the WebUI to re-populate the page with data representing the
53 * current state of installed modules. 51 * current state of installed modules.
54 * @param {Object} moduleListData Information about available modules. 52 * @param {Object} moduleListData Information about available modules.
55 */ 53 */
56 function returnModuleList(moduleListData) { 54 function returnModuleList(moduleListData) {
57 renderTemplate(moduleListData); 55 renderTemplate(moduleListData);
58 $('loading-message').style.visibility = 'hidden'; 56 $('loading-message').style.visibility = 'hidden';
59 $('body-container').style.visibility = 'visible'; 57 $('body-container').style.visibility = 'visible';
60 } 58 }
61 59
62 // Get data and have it displayed upon loading. 60 // Get data and have it displayed upon loading.
63 document.addEventListener('DOMContentLoaded', requestModuleListData); 61 document.addEventListener('DOMContentLoaded', requestModuleListData);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/about_flash.js » ('j') | chrome/browser/resources/settings/device_page/stylus.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698