Fix OpenSSL x509 unit test build breakage by adding a missing getter for a scoped_refptr.
[chromium-blink-merge.git] / chrome / app / BUILD.gn
blobdbc8c7c50757bf5d23a1b19f3f487e5b54711aee
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
3 # found in the LICENSE file.
5 import("//tools/grit/grit_rule.gni")
8 if (is_android) {
9   import("//build/config/android/rules.gni")
10   android_generated_java_resources = [
11     "java/res/values-am/generated_resources.xml",
12     "java/res/values-ar/generated_resources.xml",
13     "java/res/values-bg/generated_resources.xml",
14     "java/res/values-ca/generated_resources.xml",
15     "java/res/values-cs/generated_resources.xml",
16     "java/res/values-da/generated_resources.xml",
17     "java/res/values-de/generated_resources.xml",
18     "java/res/values-el/generated_resources.xml",
19     "java/res/values-en-rGB/generated_resources.xml",
20     "java/res/values-es-rUS/generated_resources.xml",
21     "java/res/values-es/generated_resources.xml",
22     "java/res/values-fa/generated_resources.xml",
23     "java/res/values-fi/generated_resources.xml",
24     "java/res/values-fr/generated_resources.xml",
25     "java/res/values-hi/generated_resources.xml",
26     "java/res/values-hr/generated_resources.xml",
27     "java/res/values-hu/generated_resources.xml",
28     "java/res/values-in/generated_resources.xml",
29     "java/res/values-it/generated_resources.xml",
30     "java/res/values-iw/generated_resources.xml",
31     "java/res/values-ja/generated_resources.xml",
32     "java/res/values-ko/generated_resources.xml",
33     "java/res/values-lt/generated_resources.xml",
34     "java/res/values-lv/generated_resources.xml",
35     "java/res/values-nb/generated_resources.xml",
36     "java/res/values-nl/generated_resources.xml",
37     "java/res/values-pl/generated_resources.xml",
38     "java/res/values-pt-rBR/generated_resources.xml",
39     "java/res/values-pt-rPT/generated_resources.xml",
40     "java/res/values-ro/generated_resources.xml",
41     "java/res/values-ru/generated_resources.xml",
42     "java/res/values-sk/generated_resources.xml",
43     "java/res/values-sl/generated_resources.xml",
44     "java/res/values-sr/generated_resources.xml",
45     "java/res/values-sv/generated_resources.xml",
46     "java/res/values-sw/generated_resources.xml",
47     "java/res/values-th/generated_resources.xml",
48     "java/res/values-tl/generated_resources.xml",
49     "java/res/values-tr/generated_resources.xml",
50     "java/res/values-uk/generated_resources.xml",
51     "java/res/values-vi/generated_resources.xml",
52     "java/res/values-zh-rCN/generated_resources.xml",
53     "java/res/values-zh-rTW/generated_resources.xml",
54     "java/res/values/generated_resources.xml",
55   ]
58 # GYP version: chrome/chrome_resources.gyp:chrome_strings
59 #              (generate_generated_resources action)
60 grit("generated_resources") {
61   source = "generated_resources.grd"
62   output_dir = "$root_gen_dir/chrome"
63   use_qualified_include = true
64   outputs = [
65     "grit/generated_resources.h",
66     "generated_resources_am.pak",
67     "generated_resources_ar.pak",
68     "generated_resources_bg.pak",
69     "generated_resources_bn.pak",
70     "generated_resources_ca.pak",
71     "generated_resources_cs.pak",
72     "generated_resources_da.pak",
73     "generated_resources_de.pak",
74     "generated_resources_el.pak",
75     "generated_resources_en-GB.pak",
76     "generated_resources_en-US.pak",
77     "generated_resources_es.pak",
78     "generated_resources_es-419.pak",
79     "generated_resources_et.pak",
80     "generated_resources_fa.pak",
81     "generated_resources_fake-bidi.pak",
82     "generated_resources_fi.pak",
83     "generated_resources_fil.pak",
84     "generated_resources_fr.pak",
85     "generated_resources_gu.pak",
86     "generated_resources_he.pak",
87     "generated_resources_hi.pak",
88     "generated_resources_hr.pak",
89     "generated_resources_hu.pak",
90     "generated_resources_id.pak",
91     "generated_resources_it.pak",
92     "generated_resources_ja.pak",
93     "generated_resources_kn.pak",
94     "generated_resources_ko.pak",
95     "generated_resources_lt.pak",
96     "generated_resources_lv.pak",
97     "generated_resources_ml.pak",
98     "generated_resources_mr.pak",
99     "generated_resources_ms.pak",
100     "generated_resources_nl.pak",
101     "generated_resources_nb.pak",
102     "generated_resources_pl.pak",
103     "generated_resources_pt-BR.pak",
104     "generated_resources_pt-PT.pak",
105     "generated_resources_ro.pak",
106     "generated_resources_ru.pak",
107     "generated_resources_sk.pak",
108     "generated_resources_sl.pak",
109     "generated_resources_sr.pak",
110     "generated_resources_sv.pak",
111     "generated_resources_sw.pak",
112     "generated_resources_ta.pak",
113     "generated_resources_te.pak",
114     "generated_resources_th.pak",
115     "generated_resources_tr.pak",
116     "generated_resources_uk.pak",
117     "generated_resources_vi.pak",
118     "generated_resources_zh-CN.pak",
119     "generated_resources_zh-TW.pak",
120   ]
122   if (is_android) {
123     outputs += android_generated_java_resources
124   }
127 if (is_android) {
128   java_strings_grd_prebuilt("java_strings_grd") {
129     grit_output_dir = "$root_gen_dir/chrome/java/res"
130     generated_files = rebase_path(
131         android_generated_java_resources,
132         "java/res",
133         "."
134     )
135   }
138 # GYP version: chrome/chrome_resources.gyp:chrome_strings_map
139 action("make_generated_resources_map") {
140   # Targets should depend on generated_resources_map instead.
141   visibility = [ ":generated_resources_map" ]
143   script = "//chrome/browser/metrics/variations/generate_resources_map.py"
145   inputs = [ "$root_gen_dir/chrome/grit/generated_resources.h" ]
146   outputs = [ "$root_gen_dir/chrome/generated_resources_map.cc" ]
148   args = rebase_path(inputs, root_build_dir) +
149       rebase_path(outputs, root_build_dir)
151   deps = [ ":generated_resources" ]
154 # Collect the generated .cc file from make_generated_resources_map and put it
155 # in a source set so targets that depend on it will link the source rather than
156 # specifying it manually. This doesn't happen in the GYP build.
157 source_set("generated_resources_map") {
158   sources = get_target_outputs(":make_generated_resources_map")
161 # GYP version: chrome/chrome_resources.gyp:chrome_strings
162 #              (generate_google_chrome_strings action)
163 grit("google_chrome_strings") {
164   source = "google_chrome_strings.grd"
165   output_dir = "$root_gen_dir/chrome"
166   use_qualified_include = true
167   outputs = [
168     "grit/google_chrome_strings.h",
169     "google_chrome_strings_am.pak",
170     "google_chrome_strings_ar.pak",
171     "google_chrome_strings_bg.pak",
172     "google_chrome_strings_bn.pak",
173     "google_chrome_strings_ca.pak",
174     "google_chrome_strings_cs.pak",
175     "google_chrome_strings_da.pak",
176     "google_chrome_strings_de.pak",
177     "google_chrome_strings_el.pak",
178     "google_chrome_strings_en-GB.pak",
179     "google_chrome_strings_en-US.pak",
180     "google_chrome_strings_es.pak",
181     "google_chrome_strings_es-419.pak",
182     "google_chrome_strings_et.pak",
183     "google_chrome_strings_fa.pak",
184     "google_chrome_strings_fi.pak",
185     "google_chrome_strings_fil.pak",
186     "google_chrome_strings_fr.pak",
187     "google_chrome_strings_gu.pak",
188     "google_chrome_strings_he.pak",
189     "google_chrome_strings_hi.pak",
190     "google_chrome_strings_hr.pak",
191     "google_chrome_strings_hu.pak",
192     "google_chrome_strings_id.pak",
193     "google_chrome_strings_it.pak",
194     "google_chrome_strings_ja.pak",
195     "google_chrome_strings_kn.pak",
196     "google_chrome_strings_ko.pak",
197     "google_chrome_strings_lt.pak",
198     "google_chrome_strings_lv.pak",
199     "google_chrome_strings_ml.pak",
200     "google_chrome_strings_mr.pak",
201     "google_chrome_strings_ms.pak",
202     "google_chrome_strings_nl.pak",
203     "google_chrome_strings_nb.pak",
204     "google_chrome_strings_pl.pak",
205     "google_chrome_strings_pt-BR.pak",
206     "google_chrome_strings_pt-PT.pak",
207     "google_chrome_strings_ro.pak",
208     "google_chrome_strings_ru.pak",
209     "google_chrome_strings_sk.pak",
210     "google_chrome_strings_sl.pak",
211     "google_chrome_strings_sr.pak",
212     "google_chrome_strings_sv.pak",
213     "google_chrome_strings_sw.pak",
214     "google_chrome_strings_ta.pak",
215     "google_chrome_strings_te.pak",
216     "google_chrome_strings_th.pak",
217     "google_chrome_strings_tr.pak",
218     "google_chrome_strings_uk.pak",
219     "google_chrome_strings_vi.pak",
220     "google_chrome_strings_zh-CN.pak",
221     "google_chrome_strings_zh-TW.pak",
222     "google_chrome_strings_fake-bidi.pak",
223   ]
226 # GYP version: chrome/chrome_resources.gyp:chrome_strings
227 #              (generate_chromium_strings action)
228 grit("chromium_strings") {
229   source = "chromium_strings.grd"
230   output_dir = "$root_gen_dir/chrome"
231   use_qualified_include = true
232   outputs = [
233     "grit/chromium_strings.h",
234     "chromium_strings_am.pak",
235     "chromium_strings_ar.pak",
236     "chromium_strings_bg.pak",
237     "chromium_strings_bn.pak",
238     "chromium_strings_ca.pak",
239     "chromium_strings_cs.pak",
240     "chromium_strings_da.pak",
241     "chromium_strings_de.pak",
242     "chromium_strings_el.pak",
243     "chromium_strings_en-GB.pak",
244     "chromium_strings_en-US.pak",
245     "chromium_strings_es.pak",
246     "chromium_strings_es-419.pak",
247     "chromium_strings_et.pak",
248     "chromium_strings_fa.pak",
249     "chromium_strings_fake-bidi.pak",
250     "chromium_strings_fi.pak",
251     "chromium_strings_fil.pak",
252     "chromium_strings_fr.pak",
253     "chromium_strings_gu.pak",
254     "chromium_strings_he.pak",
255     "chromium_strings_hi.pak",
256     "chromium_strings_hr.pak",
257     "chromium_strings_hu.pak",
258     "chromium_strings_id.pak",
259     "chromium_strings_it.pak",
260     "chromium_strings_ja.pak",
261     "chromium_strings_kn.pak",
262     "chromium_strings_ko.pak",
263     "chromium_strings_lt.pak",
264     "chromium_strings_lv.pak",
265     "chromium_strings_ml.pak",
266     "chromium_strings_mr.pak",
267     "chromium_strings_ms.pak",
268     "chromium_strings_nl.pak",
269     "chromium_strings_nb.pak",
270     "chromium_strings_pl.pak",
271     "chromium_strings_pt-BR.pak",
272     "chromium_strings_pt-PT.pak",
273     "chromium_strings_ro.pak",
274     "chromium_strings_ru.pak",
275     "chromium_strings_sk.pak",
276     "chromium_strings_sl.pak",
277     "chromium_strings_sr.pak",
278     "chromium_strings_sv.pak",
279     "chromium_strings_sw.pak",
280     "chromium_strings_ta.pak",
281     "chromium_strings_te.pak",
282     "chromium_strings_th.pak",
283     "chromium_strings_tr.pak",
284     "chromium_strings_uk.pak",
285     "chromium_strings_vi.pak",
286     "chromium_strings_zh-CN.pak",
287     "chromium_strings_zh-TW.pak",
288   ]
291 source_set("test_support") {
292   testonly = true
293   visibility = [ "//chrome/test:test_support" ]
295   sources = [
296     "chrome_main_delegate.cc",
297     "chrome_main_delegate.h",
298     "close_handle_hook_win.cc",
299     "close_handle_hook_win.h",
300   ]
302   deps = [
303     "//base",
304     "//chrome/browser",
305     "//chrome/common",
306     "//chrome/plugin",
307     "//chrome/renderer",
308     "//chrome/utility",
309     "//content/public/app:both",
310     "//content/public/common",
311     "//ui/base",
312   ]
314   if (is_mac) {
315     sources += [
316       "chrome_breakpad_client.cc",
317       "chrome_breakpad_client_mac.mm",
318       "chrome_main_mac.mm",
319     ]
320   }