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.
4
5import("//build/config/features.gni")
6import("//build/config/ui.gni")
7
8# Collection of all components. You wouldn't link to this, but this is rather
9# to reference the files so they can be compiled by the build system.
10group("all_components") {
11  testonly = true  # You shouldn't actually link to this.
12  visibility = [ "//:*" ]  # Only for the root targets to bring in.
13
14  deps = [
15    "//components/auto_login_parser",
16    "//components/autofill/content/browser",
17    "//components/autofill/content/common",
18    "//components/autofill/content/renderer",
19    "//components/bookmarks/browser",
20    "//components/bookmarks/common",
21    "//components/bookmarks/test",
22    "//components/captive_portal",
23    "//components/cdm/browser",
24    "//components/cdm/common",
25    "//components/cdm/renderer",
26    "//components/cloud_devices/common",
27    "//components/component_updater",
28    "//components/content_settings/core/browser",
29    "//components/content_settings/core/common",
30    "//components/crash/app",
31    "//components/crash/browser",
32    "//components/crx_file",
33    "//components/data_reduction_proxy/browser",
34    "//components/data_reduction_proxy/common",
35    "//components/dom_distiller/core",
36    "//components/domain_reliability",
37    "//components/enhanced_bookmarks",
38    "//components/favicon/core",
39    "//components/favicon_base",
40    "//components/feedback",
41    "//components/gcm_driver",
42    "//components/google/core/browser",
43    "//components/history/core/browser",
44    "//components/history/core/common",
45    "//components/history/core/test",
46    "//components/infobars/core",
47    "//components/infobars/test:test_support",
48    "//components/invalidation",
49    "//components/json_schema",
50    "//components/keyed_service/content",
51    "//components/language_usage_metrics",
52    "//components/leveldb_proto",
53    "//components/metrics",
54    "//components/native_app_window",
55    "//components/navigation_interception",
56    "//components/navigation_metrics",
57    "//components/network_time",
58    "//components/omaha_query_params",
59    "//components/omnibox",
60    "//components/onc",
61    "//components/os_crypt",
62    "//components/pairing",
63    "//components/password_manager/content/browser",
64    "//components/password_manager/core/browser",
65    "//components/password_manager/core/common",
66    "//components/pdf/browser",
67    "//components/pdf/common",
68    "//components/pdf/renderer",
69    "//components/plugins/renderer",
70    "//components/policy",
71    "//components/power",
72    "//components/precache/core",
73    "//components/precache/content",
74    "//components/pref_registry",
75    "//components/proximity_auth",
76    "//components/query_parser",
77    "//components/rappor",
78    "//components/renderer_context_menu",
79    "//components/resources:components_resources",
80    "//components/search",
81    "//components/search_engines",
82    "//components/search_provider_logos",
83    "//components/sessions",
84    "//components/signin/core/browser",
85    "//components/startup_metric_utils",
86    "//components/strings",
87    "//components/sync_driver",
88    "//components/tracing",
89    "//components/translate/content/browser",
90    "//components/translate/content/common",
91    "//components/translate/content/renderer",
92    "//components/translate/core/browser",
93    "//components/translate/core/common",
94    "//components/url_fixer",
95    "//components/url_matcher",
96    "//components/user_manager",
97    "//components/user_prefs",
98    "//components/variations",
99    "//components/visitedlink/browser",
100    "//components/visitedlink/common",
101    "//components/visitedlink/renderer",
102    "//components/web_cache/browser",
103    "//components/web_cache/common",
104    "//components/web_cache/renderer",
105    "//components/web_modal",
106    "//components/webdata/common",
107    "//components/wifi",
108  ]
109
110  if (!is_win && !is_mac) {
111    deps -= [ "//components/wifi" ]
112  }
113  if (!is_chromeos) {
114    deps -= [ "//components/pairing" ]
115  }
116  if (!toolkit_views) {
117    deps -= [ "//components/native_app_window" ]
118  }
119
120  if (is_ios) {
121    deps -= [ "//components/keyed_service/content" ]
122  }
123
124  if (!enable_plugins) {
125    deps -= [
126      "//components/pdf/browser",
127      "//components/pdf/common",
128      "//components/pdf/renderer",
129    ]
130  }
131
132  if (is_android) {
133    deps -= [
134      "//components/autofill/content/browser",  # Blocked on content/blink.
135      "//components/autofill/content/common",  # Blocked on content.
136      "//components/autofill/content/renderer",  # Blocked on content/blink.
137      "//components/crash/app",  # Should work, needs checking.
138      "//components/crash/browser",  # Should work, needs checking.
139      "//components/captive_portal",  # Should work, needs checking.
140      "//components/cloud_devices/common",  # Should work, needs checking.
141      "//components/cdm/browser",  # Blocked on content.
142      "//components/cdm/common",  # Blocked on content.
143      "//components/cdm/renderer",  # Blocked on content.
144      "//components/data_reduction_proxy/browser",  # Should work, needs checking.
145      "//components/data_reduction_proxy/common",  # Should work, needs checking.
146      "//components/dom_distiller/core",  # Blocked on content.
147      "//components/domain_reliability",  # Blocked on content.
148      "//components/favicon_base",  # Should work, needs checking.
149      "//components/favicon/core",  # Blocked on keyed service.
150      "//components/feedback",  # Blocked on content.
151      "//components/gcm_driver",  # Should work, needs checking.
152      "//components/google/core/browser",  # Should work, needs checking.
153      "//components/history/core/browser",  # Should work, needs checking.
154      "//components/history/core/common",  # Should work, needs checking.
155      "//components/history/core/test",  # Should work, needs checking.
156      "//components/infobars/core",  # Should work, needs checking.
157      "//components/infobars/test:test_support",  # Should work, needs checking.
158      "//components/invalidation",  # Should work, needs checking.
159      "//components/json_schema",  # Should work, needs checking.
160      "//components/keyed_service/content",  # Blocked on content.
161      "//components/navigation_interception",  # Blocked on content.
162      "//components/omnibox",  # Should work, needs checking.
163      "//components/password_manager/content/browser",  # Blocked on content.
164      "//components/password_manager/core/browser",  # Should work, needs checking.
165      "//components/password_manager/core/common",  # Should work, needs checking.
166      "//components/plugins/renderer",  # Blocked on blink.
167      "//components/power",  # Blocked on content.
168      "//components/policy",  # Blocked on content (indirectly via autofill).
169      "//components/precache/content",  # Blocked on content.
170      "//components/precache/core",  # Should work, needs checking.
171      "//components/rappor",  # Should work, needs checking.
172      "//components/renderer_context_menu",  # Blocked on content.
173      "//components/search_engines",  # Should work, needs checking.
174      "//components/search_provider_logos",  # Should work, needs checking.
175      "//components/sessions",  # Blocked on content.
176      "//components/signin/core/browser",  # Should work, needs checking.
177      "//components/translate/content/browser",  # Blocked on content.
178      "//components/translate/content/common",  # Blocked on content.
179      "//components/translate/content/renderer",  # Blocked on content.
180      "//components/user_prefs",  # Blocked on content.
181      "//components/visitedlink/browser",  # Blocked on content.
182      "//components/visitedlink/common",  # Blocked on content.
183      "//components/visitedlink/renderer",  # Blocked on blink
184      "//components/web_cache/browser",  # Blocked on content and blink.
185      "//components/web_cache/renderer",  # Blocked on content and blink.
186      "//components/web_modal",  # Blocked on content.
187    ]
188  }
189
190  if (!is_ios && !is_android) {
191    deps += [
192      "//components/copresence",
193      "//components/storage_monitor",
194    ]
195  }
196}
197
198# TODO(GYP) enable when it links.
199if (false) {
200
201# To add a unit test to this target, make a "unit_test" source_set in your
202# component (it's important to use a source_set instead of a static library or
203# no tests will run) and add a reference here. You can add more than one unit
204# test target if convenient.
205test("components_unittests") {
206  sources = [
207    "test/run_all_unittests.cc",
208  ]
209
210  # Add only ":unit_tests" dependencies here. If your tests have dependencies
211  # (this would at least include the component itself), they should be on the
212  # test source set and not here.
213  deps = [
214    "//components/auto_login_parser:unit_tests",
215    "//components/autofill/content/browser:unit_tests",
216    "//components/autofill/core/browser:unit_tests",
217    "//components/autofill/core/common:unit_tests",
218    "//components/bookmarks/browser:unit_tests",
219    "//components/captive_portal:unit_tests",
220    "//components/cloud_devices/common:unit_tests",
221    "//components/component_updater:unit_tests",
222    "//components/content_settings/core/browser:unit_tests",
223    "//components/content_settings/core/common:unit_tests",
224    "//components/crx_file:unit_tests",
225    "//components/data_reduction_proxy/browser:unit_tests",
226    "//components/data_reduction_proxy/common:unit_tests",
227    "//components/dom_distiller/core:unit_tests",
228    "//components/domain_reliability:unit_tests",
229    "//components/omnibox:unit_tests",
230    "//components/ownership:unit_tests",
231    "//components/proximity_auth:unit_tests",
232  ]
233
234  # TODO(GYP) need this target.
235  #'breakpad/app/crash_keys_win_unittest.cc',
236
237  # Precache tests need these defines.
238  #configs += [ "//components/precache/core:precache_config" ]
239}
240
241}
242