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

Unified Diff: chrome/chrome_paks.gni

Issue 2353553004: Revert of Create Monochrome-specific repack() targets (Closed)
Patch Set: Created 4 years, 3 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 | « chrome/browser/resources/chromeos/chromevox/BUILD.gn ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/chrome_paks.gni
diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni
index b4f86fb4ebe435cd439080a751b108e6cdd80b4d..b7592195a77042b4f57dcafd7b922cfde2135f8d 100644
--- a/chrome/chrome_paks.gni
+++ b/chrome/chrome_paks.gni
@@ -3,7 +3,6 @@
# found in the LICENSE file.
import("//build/config/locales.gni")
-import("//ui/base/ui_features.gni")
import("chrome_repack_locales.gni")
# Generates a rule to repack a set of resources, substituting a given string
@@ -73,6 +72,70 @@
}
output = "${invoker.output_dir}/chrome_${percent}_percent.pak"
+ }
+}
+
+# Paramters:
+# output_dir:
+#
+template("chrome_paks") {
+ chrome_repack_percent("${target_name}_100_percent") {
+ percent = "100"
+ forward_variables_from(invoker,
+ [
+ "copy_data_to_bundle",
+ "deps",
+ "output_dir",
+ "repack_whitelist",
+ "visibility",
+ ])
+ }
+
+ if (invoker.enable_hidpi) {
+ chrome_repack_percent("${target_name}_200_percent") {
+ percent = "200"
+ forward_variables_from(invoker,
+ [
+ "copy_data_to_bundle",
+ "deps",
+ "output_dir",
+ "repack_whitelist",
+ "visibility",
+ ])
+ }
+ }
+
+ chrome_repack_locales("${target_name}_locales") {
+ forward_variables_from(invoker,
+ [
+ "copy_data_to_bundle",
+ "deps",
+ "repack_whitelist",
+ "visibility",
+ ])
+
+ input_locales = locales
+ output_dir = "${invoker.output_dir}/locales"
+
+ if (is_mac) {
+ output_locales = locales_as_mac_outputs
+ } else {
+ output_locales = locales
+ }
+ }
+
+ group(target_name) {
+ forward_variables_from(invoker, [ "deps" ])
+ public_deps = [
+ ":${target_name}_100_percent",
+ ":${target_name}_locales",
+ ]
+ if (invoker.enable_hidpi) {
+ public_deps += [ ":${target_name}_200_percent" ]
+ }
+ if (defined(invoker.public_deps)) {
+ public_deps += invoker.public_deps
+ }
}
}
@@ -120,11 +183,11 @@
if (defined(invoker.deps)) {
deps += invoker.deps
}
- if (defined(invoker.additional_paks)) {
- sources += invoker.additional_paks
- }
-
- if (!is_android) {
+
+ if (is_android) {
+ sources += [ "$root_gen_dir/android_webview/aw_resources.pak" ]
+ deps += [ "//android_webview:generate_aw_resources" ]
+ } else { # Non-Android.
# New paks should be added here by default.
sources += [
"$root_gen_dir/blink/devtools_resources.pak",
@@ -156,97 +219,3 @@
}
}
}
-
-# Defines repack() targets used by Chrome. Specifically:
-# * chrome_100_percent.pak
-# * chrome_200_percent.pak (optionally)
-# * resources.pak
-# * locale .pak files
-#
-# Paramters:
-# output_dir [required]: Directory to output .pak files. Locale .pak files
-# will always be place in $output_dir/locales
-# additional_extra_paks: List of extra .pak sources for resources.pak.
-# copy_data_to_bundle:
-# deps:
-# output_dir:
-# public_deps:
-# repack_whitelist:
-# visibility:
-# Normal meanings.
-#
-template("chrome_paks") {
- chrome_repack_percent("${target_name}_100_percent") {
- percent = "100"
- forward_variables_from(invoker,
- [
- "copy_data_to_bundle",
- "deps",
- "output_dir",
- "repack_whitelist",
- "visibility",
- ])
- }
-
- if (enable_hidpi) {
- chrome_repack_percent("${target_name}_200_percent") {
- percent = "200"
- forward_variables_from(invoker,
- [
- "copy_data_to_bundle",
- "deps",
- "output_dir",
- "repack_whitelist",
- "visibility",
- ])
- }
- }
-
- chrome_extra_paks("${target_name}_extra") {
- forward_variables_from(invoker,
- [
- "copy_data_to_bundle",
- "deps",
- "output_dir",
- "repack_whitelist",
- "visibility",
- ])
- if (defined(invoker.additional_extra_paks)) {
- additional_paks = invoker.additional_extra_paks
- }
- }
-
- chrome_repack_locales("${target_name}_locales") {
- forward_variables_from(invoker,
- [
- "copy_data_to_bundle",
- "deps",
- "repack_whitelist",
- "visibility",
- ])
-
- input_locales = locales
- output_dir = "${invoker.output_dir}/locales"
-
- if (is_mac) {
- output_locales = locales_as_mac_outputs
- } else {
- output_locales = locales
- }
- }
-
- group(target_name) {
- forward_variables_from(invoker, [ "deps" ])
- public_deps = [
- ":${target_name}_100_percent",
- ":${target_name}_extra",
- ":${target_name}_locales",
- ]
- if (enable_hidpi) {
- public_deps += [ ":${target_name}_200_percent" ]
- }
- if (defined(invoker.public_deps)) {
- public_deps += invoker.public_deps
- }
- }
-}
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/BUILD.gn ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698