| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/chrome_build.gni") | 5 import("//build/config/chrome_build.gni") |
| 6 import("//build/config/features.gni") | 6 import("//build/config/features.gni") |
| 7 import("//build/config/ui.gni") | 7 import("//build/config/ui.gni") |
| 8 import("//extensions/features/features.gni") | 8 import("//extensions/features/features.gni") |
| 9 import("//tools/grit/repack.gni") | 9 import("//tools/grit/repack.gni") |
| 10 | 10 |
| 11 assert(!is_ios, "Chromium/iOS shouldn't use anything in //chrome") |
| 12 |
| 11 # Wraps repack_locales(), setting the source_patterns and deps required for | 13 # Wraps repack_locales(), setting the source_patterns and deps required for |
| 12 # Chrome. | 14 # Chrome. |
| 13 # | 15 # |
| 14 # Extra Parameters: | 16 # Extra Parameters: |
| 15 # | 17 # |
| 16 # additional_source_patterns [optional] | 18 # additional_source_patterns [optional] |
| 17 # Extra source_patterns for repack_locales(). | 19 # Extra source_patterns for repack_locales(). |
| 18 template("chrome_repack_locales") { | 20 template("chrome_repack_locales") { |
| 19 repack_locales(target_name) { | 21 repack_locales(target_name) { |
| 20 forward_variables_from(invoker, "*", [ "additional_source_patterns" ]) | 22 forward_variables_from(invoker, "*", [ "additional_source_patterns" ]) |
| 21 | 23 |
| 22 # Each input pak file should also have a deps line. | 24 # Each input pak file should also have a deps line. |
| 23 source_patterns = [ | 25 source_patterns = [ |
| 24 "${root_gen_dir}/chrome/generated_resources_", | 26 "${root_gen_dir}/chrome/generated_resources_", |
| 25 "${root_gen_dir}/chrome/locale_settings_", | 27 "${root_gen_dir}/chrome/locale_settings_", |
| 26 "${root_gen_dir}/chrome/platform_locale_settings_", | 28 "${root_gen_dir}/chrome/platform_locale_settings_", |
| 27 "${root_gen_dir}/components/strings/components_locale_settings_", | 29 "${root_gen_dir}/components/strings/components_locale_settings_", |
| 28 "${root_gen_dir}/components/strings/components_strings_", | 30 "${root_gen_dir}/components/strings/components_strings_", |
| 31 "${root_gen_dir}/content/app/strings/content_strings_", |
| 32 "${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_", |
| 33 "${root_gen_dir}/third_party/libaddressinput/address_input_strings_", |
| 34 "${root_gen_dir}/ui/strings/app_locale_settings_", |
| 35 "${root_gen_dir}/ui/strings/ui_strings_", |
| 29 ] | 36 ] |
| 30 if (!defined(deps)) { | 37 if (!defined(deps)) { |
| 31 deps = [] | 38 deps = [] |
| 32 } | 39 } |
| 33 deps += [ | 40 deps += [ |
| 34 "//chrome/app:generated_resources", | 41 "//chrome/app:generated_resources", |
| 35 "//chrome/app/resources:locale_settings", | 42 "//chrome/app/resources:locale_settings", |
| 36 "//chrome/app/resources:platform_locale_settings", | 43 "//chrome/app/resources:platform_locale_settings", |
| 37 "//components/strings:components_locale_settings", | 44 "//components/strings:components_locale_settings", |
| 38 "//components/strings:components_strings", | 45 "//components/strings:components_strings", |
| 46 "//content/app/strings", |
| 47 "//device/bluetooth/strings", |
| 48 "//third_party/libaddressinput:strings", |
| 49 "//ui/strings:app_locale_settings", |
| 50 "//ui/strings:ui_strings", |
| 39 ] | 51 ] |
| 40 if (defined(invoker.deps)) { | 52 if (defined(invoker.deps)) { |
| 41 deps += invoker.deps | 53 deps += invoker.deps |
| 42 } | 54 } |
| 43 | 55 |
| 44 if (use_ash) { | 56 if (use_ash) { |
| 45 source_patterns += [ "${root_gen_dir}/ash/strings/ash_strings_" ] | 57 source_patterns += [ "${root_gen_dir}/ash/strings/ash_strings_" ] |
| 46 deps += [ "//ash/strings" ] | 58 deps += [ "//ash/strings" ] |
| 47 } | 59 } |
| 48 if (is_chromeos) { | 60 if (is_chromeos) { |
| 49 source_patterns += [ | 61 source_patterns += [ |
| 50 "${root_gen_dir}/remoting/resources/", | 62 "${root_gen_dir}/remoting/resources/", |
| 51 "${root_gen_dir}/ui/chromeos/strings/ui_chromeos_strings_", | 63 "${root_gen_dir}/ui/chromeos/strings/ui_chromeos_strings_", |
| 52 ] | 64 ] |
| 53 deps += [ | 65 deps += [ |
| 54 "//remoting/resources", | 66 "//remoting/resources", |
| 55 "//ui/chromeos/strings", | 67 "//ui/chromeos/strings", |
| 56 ] | 68 ] |
| 57 } | 69 } |
| 58 if (!is_ios) { | |
| 59 source_patterns += [ | |
| 60 "${root_gen_dir}/content/app/strings/content_strings_", | |
| 61 "${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_", | |
| 62 "${root_gen_dir}/third_party/libaddressinput/address_input_strings_", | |
| 63 "${root_gen_dir}/ui/strings/app_locale_settings_", | |
| 64 "${root_gen_dir}/ui/strings/ui_strings_", | |
| 65 ] | |
| 66 deps += [ | |
| 67 "//content/app/strings", | |
| 68 "//device/bluetooth/strings", | |
| 69 "//third_party/libaddressinput:strings", | |
| 70 "//ui/strings:app_locale_settings", | |
| 71 "//ui/strings:ui_strings", | |
| 72 ] | |
| 73 } | |
| 74 if (enable_extensions) { | 70 if (enable_extensions) { |
| 75 source_patterns += | 71 source_patterns += |
| 76 [ "${root_gen_dir}/extensions/strings/extensions_strings_" ] | 72 [ "${root_gen_dir}/extensions/strings/extensions_strings_" ] |
| 77 deps += [ "//extensions/strings" ] | 73 deps += [ "//extensions/strings" ] |
| 78 } | 74 } |
| 79 | 75 |
| 80 if (is_chrome_branded) { | 76 if (is_chrome_branded) { |
| 81 source_patterns += [ | 77 source_patterns += [ |
| 82 "${root_gen_dir}/chrome/google_chrome_strings_", | 78 "${root_gen_dir}/chrome/google_chrome_strings_", |
| 83 "${root_gen_dir}/components/strings/components_google_chrome_strings_", | 79 "${root_gen_dir}/components/strings/components_google_chrome_strings_", |
| (...skipping 11 matching lines...) Expand all Loading... |
| 95 "//chrome/app:chromium_strings", | 91 "//chrome/app:chromium_strings", |
| 96 "//components/strings:components_chromium_strings", | 92 "//components/strings:components_chromium_strings", |
| 97 ] | 93 ] |
| 98 } | 94 } |
| 99 | 95 |
| 100 if (defined(invoker.additional_source_patterns)) { | 96 if (defined(invoker.additional_source_patterns)) { |
| 101 source_patterns += invoker.additional_source_patterns | 97 source_patterns += invoker.additional_source_patterns |
| 102 } | 98 } |
| 103 } | 99 } |
| 104 } | 100 } |
| OLD | NEW |