Commit 9cfaae35 authored by David's avatar David Committed by Commit Bot

Add all icon resolutions for chrome://media-app.

Currently we are intending to launch with the existing gallery icon.
This cl adds all the resolutions of the
* our app icon to our manifest.json
* the gallery icon to our resources file (media_app_resources.grd).

Points our app icons i.e. "system_assets/app_icon_*.png" to the
gallery icons.

When we add our own app icon b/141588875, we don't need to change
our manifest.json file. We would just need to:
* remove IDR_MEDIA_APP_GALLERY_ICON_*_PNG from media_app_resources.grd
* add resources for our app icon to our internal resource file
media_app_bundle_resources.grd.
* update our resource paths in media_app_ui.cc to point at our
resources from media_app_bundle_resources.grd (might need to do this
from the guest context).

or if we ship the icon to chromium just update
IDR_MEDIA_APP_GALLERY_ICON_*_PNG to point at the new icon location.

Note: some follow up work needed to get this working for rendering the
right resolution for the taskbar crbug/1110768.

Bug: b/161203411, 996088
Change-Id: I0988dbb3eaeb0eaf029c49a1643ceed85acd8715
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2325471
Commit-Queue: David Lei <dlei@google.com>
Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792610}
parent f4ab239b
...@@ -41,11 +41,25 @@ content::WebUIDataSource* CreateHostDataSource() { ...@@ -41,11 +41,25 @@ content::WebUIDataSource* CreateHostDataSource() {
web_app::SetManifestRequestFilter(source, IDR_MEDIA_APP_MANIFEST, web_app::SetManifestRequestFilter(source, IDR_MEDIA_APP_MANIFEST,
IDS_MEDIA_APP_APP_NAME); IDS_MEDIA_APP_APP_NAME);
// TODO(b/141588875): Switch this back to IDR_MEDIA_APP_APP_ICON_256_PNG (and // Redirects "system_assets/app_icon_*.png" (from manifest.json) to the icons
// add more icon resolutions) when the final icon is ready. // for the gallery app.
// TODO(b/141588875): Switch these to IDR_MEDIA_APP_APP_ICON_*_PNG in the
// internal media_app_bundle_resources.grd file (and add more icon
// resolutions) when the final icon is ready.
source->AddResourcePath("system_assets/app_icon_16.png",
IDR_MEDIA_APP_GALLERY_ICON_16_PNG);
source->AddResourcePath("system_assets/app_icon_32.png",
IDR_MEDIA_APP_GALLERY_ICON_32_PNG);
source->AddResourcePath("system_assets/app_icon_64.png",
IDR_MEDIA_APP_GALLERY_ICON_64_PNG);
source->AddResourcePath("system_assets/app_icon_96.png",
IDR_MEDIA_APP_GALLERY_ICON_96_PNG);
source->AddResourcePath("system_assets/app_icon_128.png",
IDR_MEDIA_APP_GALLERY_ICON_128_PNG);
source->AddResourcePath("system_assets/app_icon_192.png",
IDR_MEDIA_APP_GALLERY_ICON_192_PNG);
source->AddResourcePath("system_assets/app_icon_256.png", source->AddResourcePath("system_assets/app_icon_256.png",
IDR_MEDIA_APP_GALLERY_ICON_256_PNG); IDR_MEDIA_APP_GALLERY_ICON_256_PNG);
return source; return source;
} }
......
...@@ -6,6 +6,41 @@ ...@@ -6,6 +6,41 @@
"theme_color": "#202124", "theme_color": "#202124",
"background_color": "#3c4043", "background_color": "#3c4043",
"icons": [ "icons": [
{
"src": "system_assets/app_icon_16.png",
"sizes": "16x16",
"type": "image/png"
},
{
"src": "system_assets/app_icon_32.png",
"sizes": "32x32",
"type": "image/png"
},
{
"src": "system_assets/app_icon_48.png",
"sizes": "48x48",
"type": "image/png"
},
{
"src": "system_assets/app_icon_64.png",
"sizes": "64x64",
"type": "image/png"
},
{
"src": "system_assets/app_icon_96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "system_assets/app_icon_128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "system_assets/app_icon_192.png",
"sizes": "192x192",
"type": "image/png"
},
{ {
"src": "system_assets/app_icon_256.png", "src": "system_assets/app_icon_256.png",
"sizes": "256x256", "sizes": "256x256",
......
...@@ -15,6 +15,15 @@ ...@@ -15,6 +15,15 @@
<include name="IDR_MEDIA_APP_MOJO_API_BOOTSTRAP_JS" file="js/mojo_api_bootstrap.js" compress="brotli" type="BINDATA" /> <include name="IDR_MEDIA_APP_MOJO_API_BOOTSTRAP_JS" file="js/mojo_api_bootstrap.js" compress="brotli" type="BINDATA" />
<include name="IDR_MEDIA_APP_MEDIA_APP_MOJOM_JS" file="${root_gen_dir}/chromeos/components/media_app_ui/media_app_ui.mojom-lite.js" use_base_dir="false" compress="brotli" type="BINDATA" /> <include name="IDR_MEDIA_APP_MEDIA_APP_MOJOM_JS" file="${root_gen_dir}/chromeos/components/media_app_ui/media_app_ui.mojom-lite.js" use_base_dir="false" compress="brotli" type="BINDATA" />
<include name="IDR_MEDIA_APP_INDEX_SCRIPTS_JS" file="js/media_app_index_scripts.js" flattenhtml="true" compress="brotli" type="BINDATA" /> <include name="IDR_MEDIA_APP_INDEX_SCRIPTS_JS" file="js/media_app_index_scripts.js" flattenhtml="true" compress="brotli" type="BINDATA" />
<!-- TODO(b/141588875): Switch these to IDR_MEDIA_APP_APP_ICON_*_PNG in the internal media_app_bundle_resources.grd file (and add more icon resolutions) when the final icon is ready. -->
<include name="IDR_MEDIA_APP_GALLERY_ICON_16_PNG" file="../../../../ui/file_manager/gallery/images/icon16.png" type="BINDATA" />
<include name="IDR_MEDIA_APP_GALLERY_ICON_32_PNG" file="../../../../ui/file_manager/gallery/images/icon32.png" type="BINDATA" />
<include name="IDR_MEDIA_APP_GALLERY_ICON_48_PNG" file="../../../../ui/file_manager/gallery/images/icon48.png" type="BINDATA" />
<include name="IDR_MEDIA_APP_GALLERY_ICON_64_PNG" file="../../../../ui/file_manager/gallery/images/icon64.png" type="BINDATA" />
<include name="IDR_MEDIA_APP_GALLERY_ICON_96_PNG" file="../../../../ui/file_manager/gallery/images/icon96.png" type="BINDATA" />
<include name="IDR_MEDIA_APP_GALLERY_ICON_128_PNG" file="../../../../ui/file_manager/gallery/images/icon128.png" type="BINDATA" />
<include name="IDR_MEDIA_APP_GALLERY_ICON_192_PNG" file="../../../../ui/file_manager/gallery/images/icon192.png" type="BINDATA" />
<include name="IDR_MEDIA_APP_GALLERY_ICON_256_PNG" file="../../../../ui/file_manager/gallery/images/icon256.png" type="BINDATA" /> <include name="IDR_MEDIA_APP_GALLERY_ICON_256_PNG" file="../../../../ui/file_manager/gallery/images/icon256.png" type="BINDATA" />
<!-- Unprivileged guest contents. --> <!-- Unprivileged guest contents. -->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment