Remove wallet integration from requestAutocomplete, desktop, step 1: UI
[chromium-blink-merge.git] / components / BUILD.gn
blob3c9d278f2372a2a70b7dfcbb773f0cc716a519d1
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("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//testing/test.gni")
8 import("//tools/grit/repack.gni")
10 # Collection of all components. You wouldn't link to this, but this is rather
11 # to reference the files so they can be compiled by the build system.
12 group("all_components") {
13   testonly = true  # You shouldn't actually link to this.
14   visibility = [ "//:*" ]  # Only for the root targets to bring in.
16   deps = [
17     "//components/about_handler",
18     "//components/auto_login_parser",
19     "//components/autofill/content/browser",
20     "//components/autofill/content/common",
21     "//components/autofill/content/renderer",
22     "//components/bookmarks/browser",
23     "//components/bookmarks/common",
24     "//components/bookmarks/managed",
25     "//components/bookmarks/test",
26     "//components/captive_portal",
27     "//components/cdm/browser",
28     "//components/cdm/common",
29     "//components/cdm/renderer",
30     "//components/cloud_devices/common",
31     "//components/chrome_apps",
32     "//components/component_updater",
33     "//components/content_settings/core/browser",
34     "//components/content_settings/core/common",
35     "//components/crash/app",
36     "//components/crash/browser",
37     "//components/crx_file",
38     "//components/data_reduction_proxy/core/browser",
39     "//components/data_reduction_proxy/core/common",
40     "//components/device_event_log",
41     "//components/devtools_discovery",
42     "//components/devtools_http_handler",
43     "//components/dom_distiller/core",
44     "//components/domain_reliability",
45     "//components/enhanced_bookmarks",
46     "//components/favicon/core",
47     "//components/favicon_base",
48     "//components/feedback",
49     "//components/gcm_driver",
50     "//components/gcm_driver/crypto",
51     "//components/gcm_driver/instance_id",
52     "//components/google/core/browser",
53     "//components/history/content/browser",
54     "//components/history/core/browser",
55     "//components/history/core/common",
56     "//components/history/core/test",
57     "//components/infobars/core",
58     "//components/invalidation/impl",
59     "//components/json_schema",
60     "//components/keyed_service/content",
61     "//components/language_usage_metrics",
62     "//components/leveldb_proto",
63     "//components/login",
64     "//components/metrics",
65     "//components/mime_util",
66     "//components/navigation_interception",
67     "//components/navigation_metrics",
68     "//components/network_time",
69     "//components/offline_pages",
70     "//components/omnibox/browser",
71     "//components/onc",
72     "//components/open_from_clipboard",
73     "//components/os_crypt",
74     "//components/packed_ct_ev_whitelist",
75     "//components/pairing",
76     "//components/password_manager/content/browser",
77     "//components/password_manager/core/browser",
78     "//components/password_manager/core/common",
79     "//components/pdf/browser",
80     "//components/pdf/common",
81     "//components/pdf/renderer",
82     "//components/plugins/common",
83     "//components/plugins/renderer",
84     "//components/policy",
85     "//components/power",
86     "//components/precache/core",
87     "//components/precache/content",
88     "//components/proxy_config",
89     "//components/pref_registry",
90     "//components/query_parser",
91     "//components/rappor",
92     "//components/renderer_context_menu",
93     "//components/resources:components_resources",
94     "//components/search",
95     "//components/search_engines",
96     "//components/search_provider_logos",
97     "//components/security_interstitials/core",
98     "//components/sessions",
99     "//components/signin/core/browser",
100     "//components/startup_metric_utils",
101     "//components/strings",
102     "//components/sync_driver",
103     "//components/tracing",
104     "//components/tracing:startup_tracing",
105     "//components/translate/content/browser",
106     "//components/translate/content/common",
107     "//components/translate/content/renderer",
108     "//components/translate/core/browser",
109     "//components/translate/core/common",
110     "//components/ui/zoom:ui_zoom",
111     "//components/undo",
112     "//components/update_client",
113     "//components/upload_list",
114     "//components/url_formatter",
115     "//components/url_matcher",
116     "//components/user_manager",
117     "//components/user_prefs",
118     "//components/user_prefs/tracked:user_prefs_tracked",
119     "//components/variations",
120     "//components/version_info",
121     "//components/visitedlink/browser",
122     "//components/visitedlink/common",
123     "//components/visitedlink/renderer",
124     "//components/wallpaper",
125     "//components/web_cache/browser",
126     "//components/web_cache/common",
127     "//components/web_cache/renderer",
128     "//components/web_modal",
129     "//components/web_resource",
130     "//components/webcrypto",
131     "//components/webdata/common",
132     "//components/wifi",
133     "//components/wifi_sync",
134   ]
136   if (!is_android) {
137     # TODO(agrieve): Add to main deps list once compile errors are resolved.
138     deps += [ "//components/devtools_service" ]
139   }
141   if (!is_android && !is_ios) {
142     deps += [
143       "//components/proximity_auth",
144       "//components/proximity_auth/cryptauth",
145     ]
146   }
148   if (!enable_configuration_policy) {
149     deps -= [ "//components/policy" ]
150   }
152   if (!is_win && !is_mac) {
153     deps -= [ "//components/wifi" ]
154   }
155   if (!is_chromeos) {
156     deps -= [
157       "//components/pairing",
158       "//components/wifi_sync",
159     ]
160   }
162   if (!is_chromeos || !enable_extensions) {
163     deps -= [ "//components/chrome_apps" ]
164   }
166   if (is_ios) {
167     deps -= [
168       "//components/history/content/browser",
169       "//components/keyed_service/content",
170     ]
171   }
173   if (!enable_plugins) {
174     deps -= [
175       "//components/pdf/browser",
176       "//components/pdf/common",
177       "//components/pdf/renderer",
178     ]
179   }
181   if (is_android) {
182     deps -= [
183       "//components/autofill/content/browser",  # Blocked on content/blink.
184       "//components/autofill/content/common",  # Blocked on content.
185       "//components/autofill/content/renderer",  # Blocked on content/blink.
186       "//components/crash/app",  # Should work, needs checking.
187       "//components/crash/browser",  # Should work, needs checking.
188       "//components/captive_portal",  # Should work, needs checking.
189       "//components/cloud_devices/common",  # Should work, needs checking.
190       "//components/cdm/browser",  # Blocked on content.
191       "//components/cdm/common",  # Blocked on content.
192       "//components/cdm/renderer",  # Blocked on content.
193       "//components/data_reduction_proxy/core/browser",  # Should work, needs checking.
194       "//components/data_reduction_proxy/core/common",  # Should work, needs checking.
195       "//components/dom_distiller/core",  # Blocked on content.
196       "//components/domain_reliability",  # Blocked on content.
197       "//components/favicon/core",  # Blocked on keyed service.
198       "//components/favicon_base",  # Should work, needs checking.
199       "//components/feedback",  # Blocked on content.
200       "//components/google/core/browser",  # Should work, needs checking.
201       "//components/history/core/browser",  # Should work, needs checking.
202       "//components/history/core/common",  # Should work, needs checking.
203       "//components/history/core/test",  # Should work, needs checking.
204       "//components/infobars/core",  # Should work, needs checking.
205       "//components/invalidation/impl",  # Should work, needs checking.
206       "//components/json_schema",  # Should work, needs checking.
207       "//components/keyed_service/content",  # Blocked on content.
208       "//components/navigation_interception",  # Blocked on content.
209       "//components/omnibox/browser",  # Should work, needs checking.
210       "//components/password_manager/content/browser",  # Blocked on content.
211       "//components/password_manager/core/browser",  # Should work, needs checking.
212       "//components/password_manager/core/common",  # Should work, needs checking.
213       "//components/plugins/renderer",  # Blocked on blink.
214       "//components/power",  # Blocked on content.
215       "//components/policy",  # Blocked on content (indirectly via autofill).
216       "//components/precache/content",  # Blocked on content.
217       "//components/precache/core",  # Should work, needs checking.
218       "//components/rappor",  # Should work, needs checking.
219       "//components/renderer_context_menu",  # Blocked on content.
220       "//components/search_engines",  # Should work, needs checking.
221       "//components/search_provider_logos",  # Should work, needs checking.
222       "//components/sessions",  # Blocked on content.
223       "//components/signin/core/browser",  # Should work, needs checking.
224       "//components/translate/content/browser",  # Blocked on content.
225       "//components/translate/content/common",  # Blocked on content.
226       "//components/translate/content/renderer",  # Blocked on content.
227       "//components/user_prefs",  # Blocked on content.
228       "//components/visitedlink/browser",  # Blocked on content.
229       "//components/visitedlink/common",  # Blocked on content.
230       "//components/visitedlink/renderer",  # Blocked on blink
231       "//components/web_cache/browser",  # Blocked on content and blink.
232       "//components/web_cache/renderer",  # Blocked on content and blink.
233       "//components/web_modal",  # Blocked on content.
234     ]
235   }
237   if (!is_ios && !is_android) {
238     deps += [
239       "//components/copresence",
240       "//components/storage_monitor",
241     ]
242   }
244   if (!is_ios) {
245     deps += [
246       "//components/app_modal",
247       "//components/browsing_data",
248       "//components/guest_view/browser",
249       "//components/guest_view/common",
250       "//components/guest_view/renderer",
251       "//components/safe_json",
252       "//components/scheduler",
253       "//components/test_runner",
254     ]
255   }
257   if (toolkit_views) {
258     deps += [ "//components/constrained_window" ]
259   }
262 # TODO(GYP): Delete this after we've converted everything to GN.
263 # The _run targets exist only for compatibility w/ GYP.
264 group("components_unittests_run") {
265   testonly = true
266   deps = [
267     ":components_unittests",
268   ]
271 # To add a unit test to this target, make a "unit_test" source_set in your
272 # component (it's important to use a source_set instead of a static library or
273 # no tests will run) and add a reference here. You can add more than one unit
274 # test target if convenient.
275 test("components_unittests") {
276   sources = [
277     "test/run_all_unittests.cc",
278   ]
280   if (is_android || is_linux || is_mac || is_win) {
281     data = [
282       "test/data/",
284       # TODO(dpranke): Remove the next two lines after GN has rolled to 339778.
285       "$root_out_dir/components_tests_resources.pak",
286       "$root_out_dir/ui_test.pak",
287     ]
288   }
290   # Add only ":unit_tests" dependencies here. If your tests have dependencies
291   # (this would at least include the component itself), they should be on the
292   # test source set and not here.
293   deps = [
294     "//components/auto_login_parser:unit_tests",
295     "//components/autofill/content/browser:unit_tests",
296     "//components/autofill/core/browser:unit_tests",
297     "//components/autofill/core/common:unit_tests",
298     "//components/bookmarks/browser:unit_tests",
299     "//components/bookmarks/managed:unit_tests",
300     "//components/captive_portal:unit_tests",
301     "//components/cloud_devices/common:unit_tests",
302     "//components/component_updater:unit_tests",
303     "//components/content_settings/core/browser:unit_tests",
304     "//components/content_settings/core/common:unit_tests",
305     "//components/crx_file:unit_tests",
306     "//components/data_reduction_proxy/content/browser:unit_tests",
307     "//components/data_reduction_proxy/core/browser:unit_tests",
308     "//components/data_reduction_proxy/core/common:unit_tests",
309     "//components/device_event_log:unit_tests",
310     "//components/devtools_http_handler:unit_tests",
311     "//components/dom_distiller/core:unit_tests",
312     "//components/domain_reliability:unit_tests",
313     "//components/favicon_base:unit_tests",
314     "//components/gcm_driver/crypto:unit_tests",
315     "//components/gcm_driver/instance_id:unit_tests",
316     "//components/gcm_driver:unit_tests",
317     "//components/google/core/browser:unit_tests",
318     "//components/history/content/browser:unit_tests",
319     "//components/history/core/browser:unit_tests",
320     "//components/history/core/common:unit_tests",
321     "//components/invalidation/impl:unittests",
322     "//components/login:unit_tests",
323     "//components/metrics:unit_tests",
324     "//components/mime_util:unit_tests",
325     "//components/offline_pages:unit_tests",
326     "//components/omnibox/browser:unit_tests",
327     "//components/open_from_clipboard:unit_tests",
328     "//components/packed_ct_ev_whitelist:unit_tests",
329     "//components/sync_driver:unit_tests",
330     "//components/undo:unit_tests",
331     "//components/url_formatter:unit_tests",
332     "//components/update_client:unit_tests",
333     "//components/upload_list:unit_tests",
334     "//components/user_prefs/tracked:unit_tests",
335     "//components/variations:unit_tests",
336     "//components/web_resource:unit_tests",
337     "//components/webcrypto:unit_tests",
338     "//components/webdata/common:unit_tests",
340     # These are the deps required by the code in this target.
341     "//base",
342     "//base/test:test_support",
343     "//components/policy:policy_component",
344     "//content/test:test_support",
345     "//net",
346     "//ui/base",
347     "//ui/resources:ui_test_pak",
348   ]
350   data_deps = [
351     ":components_tests_pak",
352     "//third_party/mesa:osmesa",
353     "//ui/resources:ui_test_pak",
354   ]
356   if (enable_rlz_support) {
357     deps += [ "//components/rlz:unit_tests" ]
358   }
360   if (is_android) {
361     isolate_file = "components_unittests.isolate"
363     deps += [ "//content/public/android:content_java" ]
364     deps -= [
365       "//components/gcm_driver:unit_tests",
366       "//components/gcm_driver/instance_id:unit_tests",
367     ]
368   }
370   if (!is_android && !is_ios) {
371     deps += [ "//components/proximity_auth:unit_tests" ]
372   }
374   if (is_chromeos) {
375     deps += [ "//components/ownership:unit_tests" ]
376   }
378   # TODO(GYP) need this target.
379   #'breakpad/app/crash_keys_win_unittest.cc',
381   # Precache tests need these defines.
382   #configs += [ "//components/precache/core:precache_config" ]
384   if (toolkit_views) {
385     # TODO(GYP) enable this as above.
386     #deps += [ "//components/constrained_window:unit_tests" ]
387   }
388   if (is_win) {
389     deps += [ "//components/browser_watcher:unit_tests" ]
390   }
391   if (is_ios) {
392     deps -= [ "//components/devtools_http_handler:unit_tests" ]
393   }
395   if (!is_ios) {
396     deps += [
397       "//components/safe_json:unit_tests",
398       "//components/scheduler:unit_tests",
399     ]
400   }
402   if (enable_basic_printing || enable_print_preview) {
403     deps += [
404       "//components/printing/browser",
405       "//components/printing/common",
406       "//components/printing/renderer",
407     ]
408   }
411 repack("components_tests_pak") {
412   sources = [
413     "$root_gen_dir/components/components_resources.pak",
414     "$root_gen_dir/components/strings/components_strings_en-US.pak",
415   ]
417   output = "$root_out_dir/components_tests_resources.pak"
419   deps = [
420     "//components/resources",
421     "//components/strings",
422   ]
425 # TODO(GYP): Delete this after we've converted everything to GN.
426 # The _run targets exist only for compatibility w/ GYP.
427 group("components_browsertests_run") {
428   testonly = true
429   deps = [
430     ":components_browsertests",
431   ]
434 test("components_browsertests") {
435   sources = [
436     "autofill/content/browser/risk/fingerprint_browsertest.cc",
437     "autofill/content/renderer/password_form_conversion_utils_browsertest.cc",
438     "dom_distiller/content/browser/distillable_page_utils_browsertest.cc",
439     "dom_distiller/content/browser/distiller_page_web_contents_browsertest.cc",
440     "dom_distiller/content/browser/test/dom_distiller_js_browsertest.cc",
441     "password_manager/content/renderer/credential_manager_client_browsertest.cc",
442   ]
444   data = [
445     "$root_out_dir/components_tests_resources.pak",
446     "$root_out_dir/content_shell.pak",
447   ]
449   if (is_android || is_linux || is_mac || is_win) {
450     data += [
451       "test/data/",
452       "dom_distiller/core/javascript/",
453       "//third_party/dom_distiller_js/dist/test/data/",
454     ]
455   }
457   if (is_mac) {
458     data += [ "$root_out_dir/Content Shell.app/" ]
459   }
461   defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
463   deps = [
464     "autofill/content/browser",
465     "autofill/content/renderer",
466     "content_settings/core/common",
467     "dom_distiller/content:content_browser",
468     "dom_distiller/core",
469     "dom_distiller/core:test_support",
470     "password_manager/content/browser",
471     "password_manager/content/common",
472     "password_manager/content/renderer",
473     "strings",
474     "//base",
475     "//base/test:test_support",
476     "//content/test:browsertest_support",
477     "//content/test:test_support",
478     "//device/bluetooth",
479     "//testing/gmock",
480     "//testing/gtest",
481     "//ui/base",
482   ]
484   data_deps = [
485     ":components_tests_pak",
486     "//third_party/mesa:osmesa",
487   ]
489   if (is_android) {
490     sources += [ "test/android/browsertests_apk/components_browser_tests_jni_onload.cc" ]
491     sources -= [ "autofill/content/browser/risk/fingerprint_browsertest.cc" ]
492     deps += [ "//testing/android/native_test:native_test_support" ]
493     use_launcher = false
494     isolate_file = "components_browsertests.isolate"
495   }
497   if (is_linux) {
498     # content_extractor_browsertest is a standalone content extraction tool built as
499     # a MANUAL component_browsertest.
500     sources += [ "dom_distiller/standalone/content_extractor_browsertest.cc" ]
501     deps += [
502       "pref_registry:test_support",
503       "//base:prefs_test_support",
504     ]
505   }
507   if (enable_basic_printing || enable_print_preview) {
508     sources += [ "printing/test/print_web_view_helper_browsertest.cc" ]
509     deps += [ "//components/printing/test:test_support" ]
510   }
513 test("components_perftests") {
514   sources = [
515     "scheduler/child/task_queue_manager_perftest.cc",
516     "visitedlink/test/visitedlink_perftest.cc",
517   ]
519   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
520   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
522   deps = [
523     "//base",
524     "//base/test:test_support_perf",
525     "//testing/gtest",
526     "//testing/perf",
527     "//content/test:test_support",
528     "//components/visitedlink/browser",
529   ]