Commit f1d0e60a authored by Demetrios Papadopoulos's avatar Demetrios Papadopoulos Committed by Commit Bot

Extensions: Fix missing images and cleanup flattenhtml usage.

flattenhtml does not work with Polymer3 generated files. Instead register
images with the WebUIDataSource so that they can be served by a
chrome://extensions URL.

Bug: None
Change-Id: I33346fac61b1f4d0937615fa8dde38c22809de89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2003196Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732542}
parent 29d25ea2
......@@ -41,7 +41,7 @@
use_base_dir="false" type ="BINDATA" />
<include name="IDR_EXTENSIONS_ERROR_PAGE_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/error_page.js"
use_base_dir="false" type ="BINDATA" flattenhtml="true" />
use_base_dir="false" type ="BINDATA" />
<include name="IDR_EXTENSIONS_KEYBOARD_SHORTCUTS_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/keyboard_shortcuts.js"
use_base_dir="false" type ="BINDATA" />
......@@ -52,7 +52,7 @@
</if>
<include name="IDR_EXTENSIONS_MANAGER_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/manager.js"
use_base_dir="false" type ="BINDATA" flattenhtml="true" />
preprocess="true" use_base_dir="false" type ="BINDATA" />
<include name="IDR_EXTENSIONS_ICONS_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/icons.js"
use_base_dir="false" type ="BINDATA" />
......@@ -103,12 +103,11 @@
use_base_dir="false" type ="BINDATA" />
<include name="IDR_EXTENSIONS_TOOLBAR_JS"
file="${root_gen_dir}/chrome/browser/resources/extensions/toolbar.js"
use_base_dir="false" type ="BINDATA" flattenhtml="true" />
<include name="IDR_WEBUI_IMAGES_CHECKUP_IMAGE"
file="checkup_image.svg" type="BINDATA" compress="gzip" />
<include name="IDR_WEBUI_IMAGES_CHECKUP_IMAGE_DARKMODE"
file="checkup_image_dark.svg" type="BINDATA"
compress="gzip" />
preprocess="true" use_base_dir="false" type ="BINDATA" />
<include name="IDR_EXTENSIONS_CHECKUP_IMAGE"
file="checkup_image.svg" type="BINDATA" />
<include name="IDR_EXTENSIONS_CHECKUP_IMAGE_DARK"
file="checkup_image_dark.svg" type="BINDATA" />
</includes>
<structures>
<structure name="IDR_EXTENSIONS_ITEM_BEHAVIOR_JS"
......
......@@ -22,6 +22,14 @@
preprocess="true"
type="BINDATA"
compress="gzip" />
<include name="IDR_EXTENSIONS_CHECKUP_IMAGE"
file="checkup_image.svg"
type="BINDATA"
compress="gzip" />
<include name="IDR_EXTENSIONS_CHECKUP_IMAGE_DARK"
file="checkup_image_dark.svg"
type="BINDATA"
compress="gzip" />
</includes>
</release>
</grit>
......@@ -73,6 +73,9 @@ content::WebUIDataSource* CreateMdExtensionsSource(Profile* profile,
webui::SetupBundledWebUIDataSource(source, "extensions.js",
IDR_EXTENSIONS_EXTENSIONS_ROLLUP_JS,
IDR_EXTENSIONS_EXTENSIONS_HTML);
source->AddResourcePath("checkup_image.svg", IDR_EXTENSIONS_CHECKUP_IMAGE);
source->AddResourcePath("checkup_image_dark.svg",
IDR_EXTENSIONS_CHECKUP_IMAGE_DARK);
#else
webui::SetupWebUIDataSource(
source, base::make_span(kExtensionsResources, kExtensionsResourcesSize),
......
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