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

Side by Side Diff: ui/resources/BUILD.gn

Issue 2407733002: Load 200% resources in views_content_client. (Closed)
Patch Set: Require opt-in Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/views_content_client/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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("//tools/grit/grit_rule.gni") 5 import("//tools/grit/grit_rule.gni")
6 import("//tools/grit/repack.gni") 6 import("//tools/grit/repack.gni")
7 7
8 group("resources") { 8 group("resources") {
9 public_deps = [ 9 public_deps = [
10 ":ui_resources_grd", 10 ":ui_resources_grd",
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 ] 57 ]
58 } 58 }
59 } 59 }
60 60
61 # On iOS and Mac the string resources need to go into a locale subfolder, which 61 # On iOS and Mac the string resources need to go into a locale subfolder, which
62 # introduces an extra dependency. 62 # introduces an extra dependency.
63 if (is_ios || is_mac) { 63 if (is_ios || is_mac) {
64 group("ui_test_pak") { 64 group("ui_test_pak") {
65 public_deps = [ 65 public_deps = [
66 ":repack_ui_test_mac_locale_pack", 66 ":repack_ui_test_mac_locale_pack",
67 ":repack_ui_test_pak", 67 ":repack_ui_test_pak_100_percent",
68 ] 68 ]
69 } 69 }
70 70
71 # This needs to be a separate target from ui_test_pak as ui_base_unittests 71 # This needs to be a separate target from ui_test_pak as ui_base_unittests
72 # wants the generate .pak file in the bundle to be named en.lpro/locale.pak 72 # wants the generate .pak file in the bundle to be named en.lpro/locale.pak
73 # while components_unittests wants it to be named ui_test.pak. 73 # while components_unittests wants it to be named ui_test.pak.
74 bundle_data("ui_test_pak_bundle_data_locale") { 74 bundle_data("ui_test_pak_bundle_data_locale") {
75 testonly = true 75 testonly = true
76 visibility = [ ":ui_test_pak_bundle_data" ] 76 visibility = [ ":ui_test_pak_bundle_data" ]
77 public_deps = [ 77 public_deps = [
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 } else { 124 } else {
125 copy("ui_test_pak") { 125 copy("ui_test_pak") {
126 sources = [ 126 sources = [
127 "$root_out_dir/ui_test.pak", 127 "$root_out_dir/ui_test.pak",
128 ] 128 ]
129 outputs = [ 129 outputs = [
130 "$root_out_dir/ui/en-US.pak", 130 "$root_out_dir/ui/en-US.pak",
131 ] 131 ]
132 public_deps = [ 132 public_deps = [
133 ":repack_ui_test_pak", 133 ":repack_ui_test_pak_100_percent",
134 ] 134 ]
135 } 135 }
136 } 136 }
137 137
138 # This group exists just for targets that need the data file 138 # This group exists just for targets that need the data file to exist in the
139 # to exist in the build directory so it can be loaded for test purposes. 139 # build directory so it can be loaded for test purposes. If a target requires
140 # 200 percent resources it should also depend on ui_test_pak_data_200_percent.
140 group("ui_test_pak_data") { 141 group("ui_test_pak_data") {
141 data_deps = [ 142 data_deps = [
142 ":repack_ui_test_pak", 143 ":repack_ui_test_pak_100_percent",
143 ] 144 ]
144 } 145 }
145 146
146 repack("repack_ui_test_pak") { 147 group("ui_test_pak_data_200_percent") {
148 data_deps = [
149 ":repack_ui_test_pak_200_percent",
150 ]
151 }
152
153 repack("repack_ui_test_pak_100_percent") {
147 # Depend on ui_test_pak or ui_test_pak_data instead of this one. 154 # Depend on ui_test_pak or ui_test_pak_data instead of this one.
148 visibility = [ 155 visibility = [
149 ":ui_test_pak", 156 ":ui_test_pak",
150 ":ui_test_pak_data", 157 ":ui_test_pak_data",
151 ] 158 ]
152 159
153 sources = [ 160 sources = [
154 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak", 161 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
155 "$root_gen_dir/ui/resources/webui_resources.pak", 162 "$root_gen_dir/ui/resources/webui_resources.pak",
156 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak", 163 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 "$root_gen_dir/ui/views/resources/views_resources_100_percent.pak", 200 "$root_gen_dir/ui/views/resources/views_resources_100_percent.pak",
194 ] 201 ]
195 } 202 }
196 203
197 if (use_aura && toolkit_views) { 204 if (use_aura && toolkit_views) {
198 deps += [ "//ui/app_list/resources" ] 205 deps += [ "//ui/app_list/resources" ]
199 sources += [ "$root_gen_dir/ui/app_list/resources/app_list_resources_100_per cent.pak" ] 206 sources += [ "$root_gen_dir/ui/app_list/resources/app_list_resources_100_per cent.pak" ]
200 } 207 }
201 } 208 }
202 209
210 repack("repack_ui_test_pak_200_percent") {
211 visibility = [ ":ui_test_pak_data_200_percent" ]
212
213 sources = [
214 "$root_gen_dir/ui/resources/ui_resources_200_percent.pak",
215 ]
216
217 output = "$root_out_dir/ui_test_200_percent.pak"
218
219 deps = [
220 "//ui/resources",
221 ]
222
223 if (toolkit_views) {
224 deps += [ "//ui/views/resources" ]
225 sources +=
226 [ "$root_gen_dir/ui/views/resources/views_resources_200_percent.pak" ]
227 }
228 }
229
203 # Repack just the strings for the framework locales on Mac and iOS. This 230 # Repack just the strings for the framework locales on Mac and iOS. This
204 # emulates repack_locales.py, but just for en-US. Note ui_test.pak is not simply 231 # emulates repack_locales.py, but just for en-US. Note ui_test.pak is not simply
205 # copied, because it causes leaks from allocations within system libraries when 232 # copied, because it causes leaks from allocations within system libraries when
206 # trying to load non-string resources. http://crbug.com/413034. 233 # trying to load non-string resources. http://crbug.com/413034.
207 repack("repack_ui_test_mac_locale_pack") { 234 repack("repack_ui_test_mac_locale_pack") {
208 visibility = [ ":ui_test_pak" ] 235 visibility = [ ":ui_test_pak" ]
209 236
210 sources = [ 237 sources = [
211 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak", 238 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
212 "$root_gen_dir/ui/strings/ui_strings_en-US.pak", 239 "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
213 ] 240 ]
214 241
215 output = "$root_out_dir/ui/en.lproj/locale.pak" 242 output = "$root_out_dir/ui/en.lproj/locale.pak"
216 243
217 deps = [ 244 deps = [
218 "//ui/strings", 245 "//ui/strings",
219 ] 246 ]
220 } 247 }
OLDNEW
« no previous file with comments | « no previous file | ui/views_content_client/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698