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

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

Issue 2316803002: Splits ash_test_resources_100_percent into two pak files (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 unified diff | Download patch
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 import("//ui/base/ui_features.gni") 7 import("//ui/base/ui_features.gni")
8 8
9 assert(enable_hidpi) 9 assert(enable_hidpi)
10 10
11 grit("resources") { 11 grit("resources") {
12 source = "ash_resources.grd" 12 source = "ash_resources.grd"
13 outputs = [ 13 outputs = [
14 "grit/ash_resources.h", 14 "grit/ash_resources.h",
15 "ash_resources_100_percent.pak", 15 "ash_resources_100_percent.pak",
16 "ash_resources_200_percent.pak", 16 "ash_resources_200_percent.pak",
17 ] 17 ]
18 } 18 }
19 19
20 # Repacks resources needed for ash_unittests, etc. at a given scale. 20 # Repacks resources needed for ash_unittests, etc. at a given scale.
21 # TODO(msw): Use ui_test.pak instead of its pieces? (no 200% support?) 21 # TODO(msw): Use ui_test.pak instead of its pieces? (no 200% support?)
22 template("ash_test_resources") { 22 template("ash_test_resources") {
23 percent = invoker.percent 23 percent = invoker.percent
24 24
25 repack("ash_test_resources_${target_name}") { 25 repack("ash_test_resources_${target_name}") {
26 output = "$root_build_dir/ash_test_resources_${percent}_percent.pak" 26 output = "$root_build_dir/${target_name}.pak"
27 27
28 sources = [ 28 sources = [
29 "$root_gen_dir/ash/resources/ash_resources_${percent}_percent.pak", 29 "$root_gen_dir/ash/resources/ash_resources_${percent}_percent.pak",
30 "$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak", 30 "$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
31 ] 31 ]
32 32
33 if (percent == "100") { 33 if (percent == "100") {
34 sources += [ 34 sources += [ "$root_gen_dir/ui/resources/webui_resources.pak" ]
35 "$root_gen_dir/content/content_resources.pak", 35 }
36 "$root_gen_dir/ui/resources/webui_resources.pak", 36
37 ] 37 if (defined(invoker.sources)) {
38 sources += invoker.sources
38 } 39 }
39 40
40 deps = [ 41 deps = [
41 "//ash/resources", 42 "//ash/resources",
42 "//content:resources",
43 "//ui/resources", 43 "//ui/resources",
44 ] 44 ]
45 45
46 if (defined(invoker.deps)) {
47 deps += invoker.deps
48 }
49
46 if (toolkit_views) { 50 if (toolkit_views) {
47 deps += [ 51 deps += [
48 "//ui/app_list/resources", 52 "//ui/app_list/resources",
49 "//ui/views/resources", 53 "//ui/views/resources",
50 ] 54 ]
51 sources += [ 55 sources += [
52 "$root_gen_dir/ui/app_list/resources/app_list_resources_${percent}_perce nt.pak", 56 "$root_gen_dir/ui/app_list/resources/app_list_resources_${percent}_perce nt.pak",
53 "$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak ", 57 "$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak ",
54 ] 58 ]
55 59
(...skipping 12 matching lines...) Expand all
68 } 72 }
69 } 73 }
70 74
71 ash_test_resources("100_percent") { 75 ash_test_resources("100_percent") {
72 percent = "100" 76 percent = "100"
73 } 77 }
74 78
75 ash_test_resources("200_percent") { 79 ash_test_resources("200_percent") {
76 percent = "200" 80 percent = "200"
77 } 81 }
82
83 # There is no content_200_percent as content resources are only available at
msw 2016/09/06 22:57:38 We could generate ash_test_resources[with_]_conten
sky 2016/09/06 23:25:00 I originally did that (which is why I have AddData
84 # 100%.
85 ash_test_resources("content_100_percent") {
msw 2016/09/06 22:57:38 nit: with_content_100_percent?
sky 2016/09/06 23:25:00 Done.
86 percent = "100"
87 sources = [
88 "$root_gen_dir/content/content_resources.pak",
89 ]
90 deps = [
91 "//content:resources",
92 ]
93 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698