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

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

Issue 10916182: Refactor the about:version code out of about_ui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Win fixes Created 8 years, 3 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
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 * Callback from the backend with the list of variations to display. 6 * Callback from the backend with the list of variations to display.
7 * This call will build the variations section of the version page, or hide that 7 * This call will build the variations section of the version page, or hide that
8 * section if there are none to display. 8 * section if there are none to display.
9 * @param {!Array.<string>} variationsList The list of variations. 9 * @param {!Array.<string>} variationsList The list of variations.
10 */ 10 */
11 function returnVariationsList(variationsList) { 11 function returnVariationInfo(variationsList) {
12 $('variations-section').hidden = !variationsList.length; 12 $('variations-section').hidden = !variationsList.length;
13 $('variations-list').appendChild( 13 $('variations-list').appendChild(
14 parseHtmlSubset(variationsList.join('<br>'), ['BR'])); 14 parseHtmlSubset(variationsList.join('<br>'), ['BR']));
15 } 15 }
16 16
17 /**
18 * Callback from the backend with the executable path to display.
19 * @param {string} execPath The executable path to display.
20 */
21 function returnExecutablePath(execPath) {
22 $('executable_path').textContent = execPath;
23 }
24
25 /**
26 * Callback from the backend with the profile path to display.
27 * @param {string} profilePath The profile path to display.
28 */
29 function returnProfilePath(profilePath) {
30 $('profile_path').textContent = profilePath;
31 }
32
33 /**
34 * Callback from the backend with the Flash version to display.
35 * @param {string} flashVersion The Flash version to display.
36 */
37 function returnFlashVersion(flashVersion) {
38 $('flash_version').textContent = flashVersion;
39 }
40
41 /**
42 * Callback from the backend with the OS version to display.
43 * @param {string} osVersion The OS version to display.
44 */
45 function returnOsVersion(osVersion) {
46 $('os_version').textContent = osVersion;
47 }
48
17 /* All the work we do onload. */ 49 /* All the work we do onload. */
18 function onLoadWork() { 50 function onLoadWork() {
19 // This is the javascript code that processes the template: 51 chrome.send('requestVersionInfo');
20 var input = new JsEvalContext(templateData);
21 var output = $('t');
22 jstProcess(input, output);
23
24 chrome.send('requestVariationsList');
25 } 52 }
26 53
27 document.addEventListener('DOMContentLoaded', onLoadWork); 54 document.addEventListener('DOMContentLoaded', onLoadWork);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698