ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / components / autofill / core / browser / BUILD.gn
blob5c937b0ec2d21030e85939e2297ee4e956023120
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 if (is_android) {
6   import("//build/config/android/config.gni")
7   autofill_enable_sync = !is_android_webview_build
8 } else {
9   autofill_enable_sync = true
12 config("autofill_browser_config") {
13   if (autofill_enable_sync) {
14     defines = [ "AUTOFILL_ENABLE_SYNC" ]
15   }
18 # GYP version: components/autofill.gyp:autofill_regexes
19 action("regexes") {
20   visibility = [ "//components/autofill/*" ]
21   script = "//build/escape_unicode.py"
23   inputs = [
24     "autofill_regex_constants.cc.utf8",
25   ]
26   outputs = [
27     "$target_gen_dir/autofill_regex_constants.cc",
28   ]
30   args = [
31     "-o",
32     rebase_path(target_gen_dir, root_build_dir),
33   ]
34   args += rebase_path(inputs, root_build_dir)
37 # GYP version: components/autofill.gyp:autofill_core_browser
38 static_library("browser") {
39   sources = [
40     "address.cc",
41     "address.h",
42     "address_field.cc",
43     "address_field.h",
44     "address_i18n.cc",
45     "address_i18n.h",
46     "autocomplete_history_manager.cc",
47     "autocomplete_history_manager.h",
48     "autofill-inl.h",
49     "autofill_cc_infobar_delegate.cc",
50     "autofill_cc_infobar_delegate.h",
51     "autofill_client.h",
52     "autofill_country.cc",
53     "autofill_country.h",
54     "autofill_data_model.cc",
55     "autofill_data_model.h",
56     "autofill_download_manager.cc",
57     "autofill_download_manager.h",
58     "autofill_driver.h",
59     "autofill_external_delegate.cc",
60     "autofill_external_delegate.h",
61     "autofill_field.cc",
62     "autofill_field.h",
63     "autofill_ie_toolbar_import_win.cc",
64     "autofill_ie_toolbar_import_win.h",
65     "autofill_manager.cc",
66     "autofill_manager.h",
67     "autofill_manager_test_delegate.h",
68     "autofill_metrics.cc",
69     "autofill_metrics.h",
70     "autofill_popup_delegate.h",
71     "autofill_profile.cc",
72     "autofill_profile.h",
73     "autofill_regex_constants.cc.utf8",
74     "autofill_regex_constants.h",
75     "autofill_regexes.cc",
76     "autofill_regexes.h",
77     "autofill_scanner.cc",
78     "autofill_scanner.h",
79     "autofill_server_field_info.h",
80     "autofill_sync_constants.cc",
81     "autofill_sync_constants.h",
82     "autofill_type.cc",
83     "autofill_type.h",
84     "autofill_xml_parser.cc",
85     "autofill_xml_parser.h",
86     "card_unmask_delegate.cc",
87     "card_unmask_delegate.h",
88     "contact_info.cc",
89     "contact_info.h",
90     "credit_card.cc",
91     "credit_card.h",
92     "credit_card_field.cc",
93     "credit_card_field.h",
94     "email_field.cc",
95     "email_field.h",
96     "field_types.h",
97     "form_field.cc",
98     "form_field.h",
99     "form_group.cc",
100     "form_group.h",
101     "form_structure.cc",
102     "form_structure.h",
103     "name_field.cc",
104     "name_field.h",
105     "password_generator.cc",
106     "password_generator.h",
107     "personal_data_manager.cc",
108     "personal_data_manager.h",
109     "personal_data_manager_mac.mm",
110     "personal_data_manager_observer.h",
111     "phone_field.cc",
112     "phone_field.h",
113     "phone_number.cc",
114     "phone_number.h",
115     "phone_number_i18n.cc",
116     "phone_number_i18n.h",
117     "popup_item_ids.h",
118     "state_names.cc",
119     "state_names.h",
120     "suggestion.cc",
121     "suggestion.h",
122     "validation.cc",
123     "validation.h",
124     "wallet/real_pan_wallet_client.cc",
125     "wallet/real_pan_wallet_client.h",
126     "webdata/autocomplete_syncable_service.cc",
127     "webdata/autocomplete_syncable_service.h",
128     "webdata/autofill_change.cc",
129     "webdata/autofill_change.h",
130     "webdata/autofill_entry.cc",
131     "webdata/autofill_entry.h",
132     "webdata/autofill_profile_syncable_service.cc",
133     "webdata/autofill_profile_syncable_service.h",
134     "webdata/autofill_table.cc",
135     "webdata/autofill_table.h",
136     "webdata/autofill_wallet_syncable_service.cc",
137     "webdata/autofill_wallet_syncable_service.h",
138     "webdata/autofill_webdata.h",
139     "webdata/autofill_webdata_backend.h",
140     "webdata/autofill_webdata_backend_impl.cc",
141     "webdata/autofill_webdata_backend_impl.h",
142     "webdata/autofill_webdata_service.cc",
143     "webdata/autofill_webdata_service.h",
144     "webdata/autofill_webdata_service_observer.h",
145   ]
147   # Compile the generated regex file.
148   sources += get_target_outputs(":regexes")
150   deps = [
151     ":regexes",
152     "//base",
153     "//base:i18n",
154     "//base:prefs",
155     "//components/autofill/core/common",
156     "//components/infobars/core",
157     "//components/keyed_service/core",
158     "//components/os_crypt",
159     "//components/pref_registry",
160     "//components/resources",
161     "//components/strings",
162     "//components/webdata/common",
163     "//google_apis",
164     "//net",
165     "//skia",
166     "//sql",
167     "//third_party/fips181",
168     "//third_party/icu",
169     "//third_party/libaddressinput:util",
170     "//third_party/libphonenumber",
171     "//third_party/libjingle",
172     "//ui/base",
173     "//ui/gfx",
174     "//ui/gfx/geometry",
175     "//url",
176   ]
178   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
179   public_configs = [ ":autofill_browser_config" ]
181   if (autofill_enable_sync) {
182     deps += [ "//sync" ]
183   } else {
184     sources -= [
185       "webdata/autocomplete_syncable_service.cc",
186       "webdata/autocomplete_syncable_service.h",
187       "webdata/autofill_profile_syncable_service.cc",
188       "webdata/autofill_profile_syncable_service.h",
189       "webdata/autofill_wallet_syncable_service.cc",
190       "webdata/autofill_wallet_syncable_service.h",
191     ]
192   }
195 static_library("test_support") {
196   testonly = true
197   sources = [
198     "autofill_test_utils.cc",
199     "autofill_test_utils.h",
200     "data_driven_test.cc",
201     "data_driven_test.h",
202     "suggestion_test_helpers.h",
203     "test_autofill_client.cc",
204     "test_autofill_client.h",
205     "test_autofill_driver.cc",
206     "test_autofill_driver.h",
207     "test_autofill_external_delegate.cc",
208     "test_autofill_external_delegate.h",
209     "test_personal_data_manager.cc",
210     "test_personal_data_manager.h",
211   ]
213   deps = [
214     ":browser",
215     "//base",
216     "//base:prefs",
217     "//base:prefs_test_support",
218     "//base/test:test_support",
219     "//components/autofill/core/browser",
220     "//components/autofill/core/common",
221     "//components/os_crypt",
222     "//components/pref_registry",
223     "//skia",
224     "//testing/gtest",
225   ]
228 source_set("unit_tests") {
229   testonly = true
230   sources = [
231     "address_field_unittest.cc",
232     "address_unittest.cc",
233     "autocomplete_history_manager_unittest.cc",
234     "autofill_country_unittest.cc",
235     "autofill_data_model_unittest.cc",
236     "autofill_download_manager_unittest.cc",
237     "autofill_external_delegate_unittest.cc",
238     "autofill_field_unittest.cc",
239     "autofill_ie_toolbar_import_win_unittest.cc",
240     "autofill_manager_unittest.cc",
241     "autofill_merge_unittest.cc",
242     "autofill_metrics_unittest.cc",
243     "autofill_profile_unittest.cc",
244     "autofill_regexes_unittest.cc",
245     "autofill_type_unittest.cc",
246     "autofill_xml_parser_unittest.cc",
247     "contact_info_unittest.cc",
248     "credit_card_field_unittest.cc",
249     "credit_card_unittest.cc",
250     "form_field_unittest.cc",
251     "form_structure_unittest.cc",
252     "name_field_unittest.cc",
253     "password_generator_unittest.cc",
254     "personal_data_manager_unittest.cc",
255     "phone_field_unittest.cc",
256     "phone_number_i18n_unittest.cc",
257     "phone_number_unittest.cc",
258     "validation_unittest.cc",
259     "webdata/autofill_profile_syncable_service_unittest.cc",
260     "webdata/autofill_table_unittest.cc",
261     "webdata/web_data_service_unittest.cc",
262   ]
264   deps = [
265     ":browser",
266     ":test_support",
267     "//base",
268     "//base:prefs",
269     "//base/test:test_support",
270     "//components/autofill/core/common",
271     "//components/os_crypt",
272     "//components/resources",
273     "//components/strings",
274     "//components/webdata/common",
275     "//net:test_support",
276     "//sql",
277     "//sync",
278     "//sync:test_support_sync_api",
279     "//testing/gmock",
280     "//testing/gtest",
281     "//third_party/libphonenumber",
282     "//third_party/libjingle",
283     "//ui/base",
284     "//url",
285   ]