Added support for desktop OpenGL's Core Profile on Mac OS X.
[chromium-blink-merge.git] / components / BUILD.gn
blob9d946fc60946cb0dcf2154f0a555e2200dc82b20
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/auto_login_parser",
18     "//components/autofill/content/browser",
19     "//components/autofill/content/common",
20     "//components/autofill/content/renderer",
21     "//components/bookmarks/browser",
22     "//components/bookmarks/common",
23     "//components/bookmarks/managed",
24     "//components/bookmarks/test",
25     "//components/captive_portal",
26     "//components/cdm/browser",
27     "//components/cdm/common",
28     "//components/cdm/renderer",
29     "//components/cloud_devices/common",
30     "//components/component_updater",
31     "//components/content_settings/core/browser",
32     "//components/content_settings/core/common",
33     "//components/crash/app",
34     "//components/crash/browser",
35     "//components/crx_file",
36     "//components/data_reduction_proxy/core/browser",
37     "//components/data_reduction_proxy/core/common",
38     "//components/device_event_log",
39     "//components/dom_distiller/core",
40     "//components/domain_reliability",
41     "//components/enhanced_bookmarks",
42     "//components/favicon/core",
43     "//components/favicon_base",
44     "//components/feedback",
45     "//components/gcm_driver",
46     "//components/google/core/browser",
47     "//components/history/content/browser",
48     "//components/history/core/browser",
49     "//components/history/core/common",
50     "//components/history/core/test",
51     "//components/infobars/core",
52     "//components/invalidation",
53     "//components/json_schema",
54     "//components/keyed_service/content",
55     "//components/language_usage_metrics",
56     "//components/leveldb_proto",
57     "//components/login",
58     "//components/metrics",
59     "//components/navigation_interception",
60     "//components/navigation_metrics",
61     "//components/network_time",
62     "//components/omnibox",
63     "//components/onc",
64     "//components/os_crypt",
65     "//components/packed_ct_ev_whitelist",
66     "//components/pairing",
67     "//components/password_manager/content/browser",
68     "//components/password_manager/core/browser",
69     "//components/password_manager/core/common",
70     "//components/pdf/browser",
71     "//components/pdf/common",
72     "//components/pdf/renderer",
73     "//components/plugins/renderer",
74     "//components/policy",
75     "//components/power",
76     "//components/precache/core",
77     "//components/precache/content",
78     "//components/pref_registry",
79     "//components/proximity_auth",
80     "//components/proximity_auth/cryptauth",
81     "//components/query_parser",
82     "//components/rappor",
83     "//components/renderer_context_menu",
84     "//components/resources:components_resources",
85     "//components/search",
86     "//components/search_engines",
87     "//components/search_provider_logos",
88     "//components/sessions:sessions_content",
89     "//components/signin/core/browser",
90     "//components/startup_metric_utils",
91     "//components/strings",
92     "//components/sync_driver",
93     "//components/tracing",
94     "//components/translate/content/browser",
95     "//components/translate/content/common",
96     "//components/translate/content/renderer",
97     "//components/translate/core/browser",
98     "//components/translate/core/common",
99     "//components/ui/zoom:ui_zoom",
100     "//components/update_client",
101     "//components/url_fixer",
102     "//components/url_matcher",
103     "//components/user_manager",
104     "//components/user_prefs",
105     "//components/variations",
106     "//components/visitedlink/browser",
107     "//components/visitedlink/common",
108     "//components/visitedlink/renderer",
109     "//components/wallpaper",
110     "//components/web_cache/browser",
111     "//components/web_cache/common",
112     "//components/web_cache/renderer",
113     "//components/web_modal",
114     "//components/web_resource",
115     "//components/webdata/common",
116     "//components/webui_generator",
117     "//components/wifi",
118     "//components/wifi_sync",
119   ]
121   if (!enable_configuration_policy) {
122     deps -= [ "//components/policy" ]
123   }
125   if (!is_win && !is_mac) {
126     deps -= [ "//components/wifi" ]
127   }
128   if (!is_chromeos) {
129     deps -= [
130       "//components/pairing",
131       "//components/wifi_sync",
132     ]
133   }
134   if (is_ios) {
135     deps -= [
136       "//components/history/content/browser",
137       "//components/keyed_service/content",
138       "//components/webui_generator",
139     ]
140   }
142   if (!enable_plugins) {
143     deps -= [
144       "//components/pdf/browser",
145       "//components/pdf/common",
146       "//components/pdf/renderer",
147     ]
148   }
150   if (is_android) {
151     deps -= [
152       "//components/autofill/content/browser",  # Blocked on content/blink.
153       "//components/autofill/content/common",  # Blocked on content.
154       "//components/autofill/content/renderer",  # Blocked on content/blink.
155       "//components/crash/app",  # Should work, needs checking.
156       "//components/crash/browser",  # Should work, needs checking.
157       "//components/captive_portal",  # Should work, needs checking.
158       "//components/cloud_devices/common",  # Should work, needs checking.
159       "//components/cdm/browser",  # Blocked on content.
160       "//components/cdm/common",  # Blocked on content.
161       "//components/cdm/renderer",  # Blocked on content.
162       "//components/data_reduction_proxy/core/browser",  # Should work, needs checking.
163       "//components/data_reduction_proxy/core/common",  # Should work, needs checking.
164       "//components/dom_distiller/core",  # Blocked on content.
165       "//components/domain_reliability",  # Blocked on content.
166       "//components/favicon/core",  # Blocked on keyed service.
167       "//components/favicon_base",  # Should work, needs checking.
168       "//components/feedback",  # Blocked on content.
169       "//components/gcm_driver",  # Should work, needs checking.
170       "//components/google/core/browser",  # Should work, needs checking.
171       "//components/history/core/browser",  # Should work, needs checking.
172       "//components/history/core/common",  # Should work, needs checking.
173       "//components/history/core/test",  # Should work, needs checking.
174       "//components/infobars/core",  # Should work, needs checking.
175       "//components/invalidation",  # Should work, needs checking.
176       "//components/json_schema",  # Should work, needs checking.
177       "//components/keyed_service/content",  # Blocked on content.
178       "//components/navigation_interception",  # Blocked on content.
179       "//components/omnibox",  # Should work, needs checking.
180       "//components/password_manager/content/browser",  # Blocked on content.
181       "//components/password_manager/core/browser",  # Should work, needs checking.
182       "//components/password_manager/core/common",  # Should work, needs checking.
183       "//components/plugins/renderer",  # Blocked on blink.
184       "//components/power",  # Blocked on content.
185       "//components/policy",  # Blocked on content (indirectly via autofill).
186       "//components/precache/content",  # Blocked on content.
187       "//components/precache/core",  # Should work, needs checking.
188       "//components/rappor",  # Should work, needs checking.
189       "//components/renderer_context_menu",  # Blocked on content.
190       "//components/search_engines",  # Should work, needs checking.
191       "//components/search_provider_logos",  # Should work, needs checking.
192       "//components/sessions:sessions_content",  # Blocked on content.
193       "//components/signin/core/browser",  # Should work, needs checking.
194       "//components/translate/content/browser",  # Blocked on content.
195       "//components/translate/content/common",  # Blocked on content.
196       "//components/translate/content/renderer",  # Blocked on content.
197       "//components/user_prefs",  # Blocked on content.
198       "//components/visitedlink/browser",  # Blocked on content.
199       "//components/visitedlink/common",  # Blocked on content.
200       "//components/visitedlink/renderer",  # Blocked on blink
201       "//components/web_cache/browser",  # Blocked on content and blink.
202       "//components/web_cache/renderer",  # Blocked on content and blink.
203       "//components/web_modal",  # Blocked on content.
204     ]
205   }
207   if (!is_ios && !is_android) {
208     deps += [
209       "//components/copresence",
210       "//components/storage_monitor",
211     ]
212   }
214   if (!is_ios) {
215     deps += [ "//components/app_modal" ]
216   }
218   if (toolkit_views) {
219     deps += [ "//components/constrained_window" ]
220   }
223 # To add a unit test to this target, make a "unit_test" source_set in your
224 # component (it's important to use a source_set instead of a static library or
225 # no tests will run) and add a reference here. You can add more than one unit
226 # test target if convenient.
227 test("components_unittests") {
228   sources = [
229     "test/run_all_unittests.cc",
230   ]
232   # Add only ":unit_tests" dependencies here. If your tests have dependencies
233   # (this would at least include the component itself), they should be on the
234   # test source set and not here.
235   deps = [
236     "//components/auto_login_parser:unit_tests",
237     "//components/autofill/content/browser:unit_tests",
238     "//components/autofill/core/browser:unit_tests",
239     "//components/autofill/core/common:unit_tests",
240     "//components/bookmarks/browser:unit_tests",
241     "//components/bookmarks/managed:unit_tests",
242     "//components/captive_portal:unit_tests",
243     "//components/cloud_devices/common:unit_tests",
244     "//components/content_settings/core/browser:unit_tests",
245     "//components/content_settings/core/common:unit_tests",
246     "//components/crx_file:unit_tests",
247     "//components/data_reduction_proxy/content/browser:unit_tests",
248     "//components/data_reduction_proxy/core/browser:unit_tests",
249     "//components/data_reduction_proxy/core/common:unit_tests",
250     "//components/device_event_log:unit_tests",
251     "//components/dom_distiller/core:unit_tests",
252     "//components/domain_reliability:unit_tests",
253     "//components/favicon_base:unit_tests",
254     "//components/google/core/browser:unit_tests",
255     "//components/invalidation:unittests",
256     "//components/login:unit_tests",
257     "//components/metrics:unit_tests",
258     "//components/omnibox:unit_tests",
259     "//components/ownership:unit_tests",
260     "//components/packed_ct_ev_whitelist:unit_tests",
261     "//components/proximity_auth:unit_tests",
262     "//components/update_client:unit_tests",
263     "//components/variations:unit_tests",
264     "//components/web_resource:unit_tests",
265     "//components/webdata/common:unit_tests",
267     # These are the deps required by the code in this target.
268     "//base",
269     "//base/test:test_support",
270     "//content/test:test_support",
271     "//ui/base",
272   ]
273   data_deps = [ ":components_tests_pak" ]
275   # TODO(GYP) need this target.
276   #'breakpad/app/crash_keys_win_unittest.cc',
278   # Precache tests need these defines.
279   #configs += [ "//components/precache/core:precache_config" ]
281   if (toolkit_views) {
282     # TODO(GYP) enable this as above.
283     #deps += [ "//components/constrained_window:unit_tests" ]
284   }
285   if (is_win) {
286     deps += [ "//components/browser_watcher:unit_tests" ]
287   }
290 repack("components_tests_pak") {
291   sources = [
292     "$root_gen_dir/components/components_resources.pak",
293     "$root_gen_dir/components/strings/components_strings_en-US.pak",
294     "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
295     "$root_gen_dir/ui/resources/webui_resources.pak",
296     "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
297     "$root_gen_dir/ui/strings/ui_strings_en-US.pak",
298   ]
300   output = "$root_out_dir/components_tests_resources.pak"
302   deps = [
303     "//components/resources",
304     "//components/strings",
305     "//ui/resources",
306     "//ui/strings",
307   ]
310 test("components_browsertests") {
311   sources = [
312     "autofill/content/browser/risk/fingerprint_browsertest.cc",
313     "autofill/content/renderer/password_form_conversion_utils_browsertest.cc",
314     "dom_distiller/content/distiller_page_web_contents_browsertest.cc",
315     "password_manager/content/renderer/credential_manager_client_browsertest.cc",
316   ]
318   defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
320   deps = [
321     "autofill/content/browser",
322     "autofill/content/renderer",
323     "content_settings/core/common",
324     "dom_distiller/content",
325     "dom_distiller/core",
326     "dom_distiller/core:test_support",
327     "password_manager/content/browser",
328     "password_manager/content/common",
329     "password_manager/content/renderer",
330     "strings",
331     "//base",
332     "//base/test:test_support",
333     "//content/test:browsertest_support",
334     "//content/test:test_support",
336     "//testing/gmock",
337     "//testing/gtest",
338     "//ui/base",
339   ]
341   data_deps = [ ":components_tests_pak" ]
343   if (is_android) {
344     sources -= [ "autofill/content/browser/risk/fingerprint_browsertest.cc" ]
345   }
347   if (is_linux) {
348     # content_extractor_browsertest is a standalone content extraction tool built as
349     # a MANUAL component_browsertest.
350     sources += [ "dom_distiller/standalone/content_extractor_browsertest.cc" ]
351     deps += [
352       "pref_registry:test_support",
353       "//base:prefs_test_support",
354     ]
355   }
358 test("components_perftests") {
359   sources = [
360     "visitedlink/test/visitedlink_perftest.cc",
361   ]
363   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
364   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
366   deps = [
367     "//base",
368     "//base/test:test_support_perf",
369     "//testing/gtest",
370     "//content/test:test_support",
371     "//components/visitedlink/browser",
372   ]