This CL integrates the generate_code_cache() webui build rule into
build_webui to simplify integration of existing webui resources.
The generate_code_cache optimize param is introduced to build_webui
and will enable the generate_code_cache step provided optimize and
minify configurations are specified. Further this will only apply
in cases where the enable_webui_generate_code_cache webui_feature
is true.
If enabled and configured correctly a grdp rule is introduced by
the build_webui template that can be used to aggregate the code
cache resources into a single grd for integration into the
resource bundle.
This CL also demonstrates use of the build rule by integrating
cr_elements into the //ui/webui/resources:code_cache_resources
target.
Bug: 378504039
Change-Id: Iab1a044201d45ac93d66478dbff39d0195894948
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6332418
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Tom Lukaszewicz <tluk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1430546}