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

Side by Side Diff: components/version_ui/resources/about_version_ios.js

Issue 1486403002: Mojo-ifying chrome://version. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing DOMContentLoaded TODO. Created 5 years 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 * 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 returnVariationInfo(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 and profile paths to display.
19 * @param {string} execPath The executable path to display.
20 * @param {string} profilePath The profile path to display.
21 */
22 function returnFilePaths(execPath, profilePath) {
23 $('executable_path').textContent = execPath;
24 $('profile_path').textContent = profilePath;
25 }
26
27 /**
28 * Callback from the backend with the Flash version to display.
29 * @param {string} flashVersion The Flash version to display.
30 */
31 function returnFlashVersion(flashVersion) {
32 $('flash_version').textContent = flashVersion;
33 }
34
35 /**
36 * Callback from the backend with the OS version to display.
37 * @param {string} osVersion The OS version to display.
38 */
39 function returnOsVersion(osVersion) {
40 $('os_version').textContent = osVersion;
41 }
42 17
43 /* All the work we do onload. */ 18 /* All the work we do onload. */
44 function onLoadWork() { 19 function onLoadWork() {
Dan Beam 2015/12/09 21:45:07 nit: onLoad seems more like everywhere else, or ju
45 chrome.send('requestVersionInfo'); 20 chrome.send('requestVersionInfo');
46 } 21 }
47 22
48 document.addEventListener('DOMContentLoaded', onLoadWork); 23 document.addEventListener('DOMContentLoaded', onLoadWork);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698