Chromium Code Reviews| Index: chrome/browser/resources/webapks/about_webapks.js |
| diff --git a/chrome/browser/resources/webapks/about_webapks.js b/chrome/browser/resources/webapks/about_webapks.js |
| index ae929d6ed4c1a2b5e4d0cf3ad78bc26693bde1e3..1a58b6c1daa33893ce0f71fc44dc14e61cc15fde 100644 |
| --- a/chrome/browser/resources/webapks/about_webapks.js |
| +++ b/chrome/browser/resources/webapks/about_webapks.js |
| @@ -4,10 +4,19 @@ |
| /** |
| * @typedef {{ |
| + * name: string, |
| * shortName: string, |
| * packageName: string, |
| * shellApkVersion: number, |
| * versionCode: number |
| + * uri: string, |
| + * scope: string, |
| + * manifestUrl: string, |
| + * manifestStartUrl: string, |
| + * displayMode: string, |
| + * orientation: string, |
| + * themeColor: string, |
| + * backgroundColor: string, |
| * }} |
| */ |
| var WebApkInfo; |
| @@ -40,6 +49,13 @@ function returnWebApksInfo(webApkList) { |
| } |
| } |
|
Dan Beam
2017/02/24 18:36:16
can you add @param documentation here?
gonzalon
2017/02/24 22:30:52
Done.
|
| +function addWebApkField(webApkList, label, value) { |
| + webApkList.appendChild(document.createElement('br')); |
|
Dan Beam
2017/02/24 18:36:16
instead of <br><span>, why not just <div>?
gonzalon
2017/02/24 22:30:52
Done.
|
| + webApkList.appendChild(createSpanWithTextAndClass( |
| + label, 'app-property-label')); |
| + webApkList.appendChild(document.createTextNode(value)); |
| +} |
| + |
| /** |
| * Adds a new entry to the page with the information of a WebAPK. |
| * |
| @@ -49,21 +65,23 @@ function addWebApk(webApkInfo) { |
| var webApkList = $('webapk-list'); |
| webApkList.appendChild( |
| - createSpanWithTextAndClass(webApkInfo.shortName, 'app-name')); |
| + createSpanWithTextAndClass(webApkInfo.name, 'app-name')); |
| webApkList.appendChild( |
| - createSpanWithTextAndClass('Package name: ', 'app-property-label')); |
| - webApkList.appendChild(document.createTextNode(webApkInfo.packageName)); |
| + createSpanWithTextAndClass('Short name: ', 'app-property-label')); |
| + webApkList.appendChild(document.createTextNode(webApkInfo.shortName)); |
| - webApkList.appendChild(document.createElement('br')); |
| - webApkList.appendChild(createSpanWithTextAndClass( |
| - 'Shell APK version: ', 'app-property-label')); |
| - webApkList.appendChild(document.createTextNode(webApkInfo.shellApkVersion)); |
| - |
| - webApkList.appendChild(document.createElement('br')); |
| - webApkList.appendChild( |
| - createSpanWithTextAndClass('Version code: ', 'app-property-label')); |
| - webApkList.appendChild(document.createTextNode(webApkInfo.versionCode)); |
| + addWebApkField(webApkList, 'Package name: ', webApkInfo.packageName); |
| + addWebApkField(webApkList, 'Shell APK version: ', webApkInfo.shellApkVersion); |
| + addWebApkField(webApkList, 'Version code: ', webApkInfo.versionCode); |
| + addWebApkField(webApkList, 'URI: ', webApkInfo.uri); |
| + addWebApkField(webApkList, 'Scope: ', webApkInfo.scope); |
| + addWebApkField(webApkList, 'Manifest URL: ', webApkInfo.manifestUrl); |
| + addWebApkField(webApkList, 'Manifest Start URL: ', webApkInfo.manifestStartUrl); |
|
Dan Beam
2017/02/24 18:36:16
80 col wrap
gonzalon
2017/02/24 22:30:52
Done.
|
| + addWebApkField(webApkList, 'Display Mode: ', webApkInfo.displayMode); |
| + addWebApkField(webApkList, 'Orientation: ', webApkInfo.orientation); |
| + addWebApkField(webApkList, 'Theme color: ', webApkInfo.themeColor); |
| + addWebApkField(webApkList, 'Background color: ', webApkInfo.backgroundColor); |
| } |
| document.addEventListener('DOMContentLoaded', function() { |