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