Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1080)

Unified Diff: chrome/BUILD.gn

Issue 1197813002: Generate resource pak files for top chrome material design assets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: re-upload Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/app/theme/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/BUILD.gn
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 994fdc1c418d2ae61945aaed67225da55da8c87e..74039425cb43958c741c926c3aea86b4a5ccec27 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -474,6 +474,14 @@ group("packed_resources") {
if (enable_hidpi) {
deps += [ ":repack_chrome_200_percent" ]
}
+
+ if (enable_topchrome_md) {
+ deps += [ ":repack_chrome_material_100_percent" ]
+
+ if (enable_hidpi) {
+ deps += [ ":repack_chrome_material_200_percent" ]
+ }
+ }
}
repack("packed_extra_resources") {
@@ -700,6 +708,58 @@ if (enable_hidpi) {
}
}
+# Generates a rule to repack a set of material design resources for the browser
+# top chrome, substituting a given string in for the percentage (e.g. "100",
+# "200").
+template("chrome_repack_material_percent") {
+ percent = invoker.percent
+
+ repack_name = "${target_name}_repack"
+ repack_output_file = "$root_gen_dir/repack/chrome_material_${percent}_percent.pak"
+
+ copy_name = target_name
+
+ repack(repack_name) {
+ visibility = [ ":$copy_name" ]
+
+ # All sources should also have deps for completeness.
+ sources = [
+ "$root_gen_dir/chrome/theme_resources_material_${percent}_percent.pak",
+ ]
+
+ deps = [
+ "//chrome/app/theme:theme_resources",
+ ]
+
+ output = repack_output_file
+ }
+
+ copy(copy_name) {
+ visibility = [ ":*" ]
+ deps = [
+ ":$repack_name",
+ ]
+ sources = [
+ repack_output_file,
+ ]
+ outputs = [
+ "$root_build_dir/chrome_material_${percent}_percent.pak",
+ ]
+ }
+}
+
+if (enable_topchrome_md) {
+ chrome_repack_material_percent("repack_chrome_material_100_percent") {
+ percent = "100"
+ }
+
+ if (enable_hidpi) {
+ chrome_repack_material_percent("repack_chrome_material_200_percent") {
+ percent = "200"
+ }
+ }
+}
+
# GYP version: chrome/chrome_resources.gyp:chrome_strings
group("strings") {
deps = [
« no previous file with comments | « no previous file | chrome/app/theme/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698