Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 */ |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 | 34 |
| 35 /** | 35 /** |
| 36 * Callback from the backend with the OS version to display. | 36 * Callback from the backend with the OS version to display. |
| 37 * @param {string} osVersion The OS version to display. | 37 * @param {string} osVersion The OS version to display. |
| 38 */ | 38 */ |
| 39 function returnOsVersion(osVersion) { | 39 function returnOsVersion(osVersion) { |
| 40 $('os_version').textContent = osVersion; | 40 $('os_version').textContent = osVersion; |
| 41 } | 41 } |
| 42 | 42 |
| 43 /** | 43 /** |
| 44 * Callback from the backend with the firmware version to display. | |
| 45 * @param {string} firmwareVersion | |
|
achuithb
2017/02/16 20:08:36
the firmware version to display.
stevenjb
2017/02/16 20:26:53
I didn't mess with the other comments, but we've b
| |
| 46 */ | |
| 47 function returnOsFirmwareVersion(firmwareVersion) { | |
| 48 $('firmware_version').textContent = firmwareVersion; | |
| 49 } | |
| 50 | |
| 51 /** | |
| 44 * Callback from the backend with the ARC version to display. | 52 * Callback from the backend with the ARC version to display. |
| 45 * @param {string} arcVersion The ARC version to display. | 53 * @param {string} arcVersion The ARC version to display. |
| 46 */ | 54 */ |
| 47 function returnARCVersion(arcVersion) { | 55 function returnARCVersion(arcVersion) { |
| 48 $('arc_version').textContent = arcVersion; | 56 $('arc_version').textContent = arcVersion; |
| 49 $('arc_holder').hidden = !arcVersion; | 57 $('arc_holder').hidden = !arcVersion; |
| 50 } | 58 } |
| 51 | 59 |
| 52 /** | 60 /** |
| 53 * Callback from chromeosInfoPrivate with the value of the customization ID. | 61 * Callback from chromeosInfoPrivate with the value of the customization ID. |
| 54 * @param {!{customizationId: string}} response | 62 * @param {!{customizationId: string}} response |
| 55 */ | 63 */ |
| 56 function returnCustomizationId(response) { | 64 function returnCustomizationId(response) { |
| 57 if (!response.customizationId) | 65 if (!response.customizationId) |
| 58 return; | 66 return; |
| 59 $('customization_id_holder').hidden = false; | 67 $('customization_id_holder').hidden = false; |
| 60 $('customization_id').textContent = response.customizationId; | 68 $('customization_id').textContent = response.customizationId; |
| 61 } | 69 } |
| 62 | 70 |
| 63 /* All the work we do onload. */ | 71 /* All the work we do onload. */ |
| 64 function onLoadWork() { | 72 function onLoadWork() { |
| 65 chrome.send('requestVersionInfo'); | 73 chrome.send('requestVersionInfo'); |
| 66 if (cr.isChromeOS) { | 74 if (cr.isChromeOS) { |
| 67 $('arc_holder').hidden = true; | 75 $('arc_holder').hidden = true; |
| 68 chrome.chromeosInfoPrivate.get(['customizationId'], returnCustomizationId); | 76 chrome.chromeosInfoPrivate.get(['customizationId'], returnCustomizationId); |
| 69 } | 77 } |
| 70 } | 78 } |
| 71 | 79 |
| 72 document.addEventListener('DOMContentLoaded', onLoadWork); | 80 document.addEventListener('DOMContentLoaded', onLoadWork); |
| OLD | NEW |