Move web_request_condition* files to extensions/browser/api/declarative_webrequest/
[chromium-blink-merge.git] / extensions / browser / BUILD.gn
blob73e62eb95d9af09f7d0e9b0c7ac2547c699f84ea
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/crypto.gni")
6 import("//build/config/features.gni")
8 # GYP version: extensions/extensions.gyp:extensions_browser
9 source_set("browser") {
10   sources = [
11   ]
13   deps = [
14     "//components/keyed_service/content",
15     "//components/keyed_service/core",
16     "//components/pref_registry",
17     "//components/sessions",
18     "//components/web_modal",
19     "//content/public/browser",
20     "//extensions/common",
21     "//extensions/common/api",
22     "//extensions/common/api:api_registration",
23     "//extensions/strings",
24     "//skia",
25     "//third_party/leveldatabase",
26   ]
28   if (enable_extensions) {
29     # Includes all API implementations and the ExtensionsApiClient
30     # interface. Moving an API from src/chrome to src/extensions implies
31     # it can be cleanly disabled with enable_extensions=false.
32     # TODO: Eventually the entire extensions module should not be built
33     # when enable_extensions=false.
34     sources += [
35       "api/api_resource.cc",
36       "api/api_resource.h",
37       "api/api_resource_manager.h",
38       "api/app_current_window_internal/app_current_window_internal_api.cc",
39       "api/app_current_window_internal/app_current_window_internal_api.h",
40       "api/app_runtime/app_runtime_api.cc",
41       "api/app_runtime/app_runtime_api.h",
42       "api/app_view/app_view_internal_api.cc",
43       "api/app_view/app_view_internal_api.h",
44       "api/app_window/app_window_api.cc",
45       "api/app_window/app_window_api.h",
46       "api/guest_view/guest_view_internal_api.cc",
47       "api/guest_view/guest_view_internal_api.h",
48       "api/async_api_function.cc",
49       "api/async_api_function.h",
50       "api/bluetooth/bluetooth_api.cc",
51       "api/bluetooth/bluetooth_api.h",
52       "api/bluetooth/bluetooth_api_pairing_delegate.cc",
53       "api/bluetooth/bluetooth_api_pairing_delegate.h",
54       "api/bluetooth/bluetooth_api_utils.cc",
55       "api/bluetooth/bluetooth_api_utils.h",
56       "api/bluetooth/bluetooth_event_router.cc",
57       "api/bluetooth/bluetooth_event_router.h",
58       "api/bluetooth/bluetooth_extension_function.cc",
59       "api/bluetooth/bluetooth_extension_function.h",
60       "api/bluetooth/bluetooth_private_api.cc",
61       "api/bluetooth/bluetooth_private_api.h",
62       "api/bluetooth_low_energy/bluetooth_low_energy_api.cc",
63       "api/bluetooth_low_energy/bluetooth_low_energy_api.h",
64       "api/bluetooth_low_energy/bluetooth_low_energy_connection.cc",
65       "api/bluetooth_low_energy/bluetooth_low_energy_connection.h",
66       "api/bluetooth_low_energy/bluetooth_low_energy_event_router.cc",
67       "api/bluetooth_low_energy/bluetooth_low_energy_event_router.h",
68       "api/bluetooth_low_energy/bluetooth_low_energy_notify_session.cc",
69       "api/bluetooth_low_energy/bluetooth_low_energy_notify_session.h",
70       "api/bluetooth_low_energy/utils.cc",
71       "api/bluetooth_low_energy/utils.h",
72       "api/bluetooth_socket/bluetooth_api_socket.cc",
73       "api/bluetooth_socket/bluetooth_api_socket.h",
74       "api/bluetooth_socket/bluetooth_socket_api.cc",
75       "api/bluetooth_socket/bluetooth_socket_api.h",
76       "api/bluetooth_socket/bluetooth_socket_event_dispatcher.cc",
77       "api/bluetooth_socket/bluetooth_socket_event_dispatcher.h",
78       "api/capture_web_contents_function.cc",
79       "api/capture_web_contents_function.h",
80       "api/cast_channel/cast_auth_util.cc",
81       "api/cast_channel/cast_auth_util.h",
82       "api/cast_channel/cast_channel_api.cc",
83       "api/cast_channel/cast_channel_api.h",
84       "api/cast_channel/cast_framer.cc",
85       "api/cast_channel/cast_framer.h",
86       "api/cast_channel/cast_message_util.cc",
87       "api/cast_channel/cast_message_util.h",
88       "api/cast_channel/cast_socket.cc",
89       "api/cast_channel/cast_socket.h",
90       "api/cast_channel/logger.cc",
91       "api/cast_channel/logger.h",
92       "api/cast_channel/logger_util.cc",
93       "api/cast_channel/logger_util.h",
94       "api/declarative/declarative_api.cc",
95       "api/declarative/declarative_api.h",
96       "api/declarative/declarative_rule.h",
97       "api/declarative/deduping_factory.h",
98       "api/declarative/rules_cache_delegate.cc",
99       "api/declarative/rules_cache_delegate.h",
100       "api/declarative/rules_registry.cc",
101       "api/declarative/rules_registry.h",
102       "api/declarative/test_rules_registry.cc",
103       "api/declarative/test_rules_registry.h",
104       "api/declarative_webrequest/request_stage.cc",
105       "api/declarative_webrequest/request_stage.h",
106       "api/declarative_webrequest/webrequest_condition_attribute.cc",
107       "api/declarative_webrequest/webrequest_condition_attribute.h",
108       "api/declarative_webrequest/webrequest_condition.cc",
109       "api/declarative_webrequest/webrequest_condition.h",
110       "api/declarative_webrequest/webrequest_constants.cc",
111       "api/declarative_webrequest/webrequest_constants.h",
112       "api/dns/dns_api.cc",
113       "api/dns/dns_api.h",
114       "api/dns/host_resolver_wrapper.cc",
115       "api/dns/host_resolver_wrapper.h",
116       "api/execute_code_function.cc",
117       "api/execute_code_function.h",
118       "api/extensions_api_client.cc",
119       "api/extensions_api_client.h",
120       "api/hid/hid_api.cc",
121       "api/hid/hid_api.h",
122       "api/hid/hid_connection_resource.cc",
123       "api/hid/hid_connection_resource.h",
124       "api/hid/hid_device_manager.cc",
125       "api/hid/hid_device_manager.h",
126       "api/power/power_api.cc",
127       "api/power/power_api.h",
128       "api/power/power_api_manager.cc",
129       "api/power/power_api_manager.h",
130       "api/runtime/runtime_api.cc",
131       "api/runtime/runtime_api.h",
132       "api/runtime/runtime_api_delegate.cc",
133       "api/runtime/runtime_api_delegate.h",
134       "api/serial/serial_api.cc",
135       "api/serial/serial_api.h",
136       "api/serial/serial_connection.cc",
137       "api/serial/serial_connection.h",
138       "api/serial/serial_event_dispatcher.cc",
139       "api/serial/serial_event_dispatcher.h",
140       "api/socket/socket.cc",
141       "api/socket/socket.h",
142       "api/socket/socket_api.cc",
143       "api/socket/socket_api.h",
144       "api/socket/tcp_socket.cc",
145       "api/socket/tcp_socket.h",
146       "api/socket/tls_socket.cc",
147       "api/socket/tls_socket.h",
148       "api/socket/udp_socket.cc",
149       "api/socket/udp_socket.h",
150       "api/sockets_tcp/sockets_tcp_api.cc",
151       "api/sockets_tcp/sockets_tcp_api.h",
152       "api/sockets_tcp/tcp_socket_event_dispatcher.cc",
153       "api/sockets_tcp/tcp_socket_event_dispatcher.h",
154       "api/sockets_tcp_server/sockets_tcp_server_api.cc",
155       "api/sockets_tcp_server/sockets_tcp_server_api.h",
156       "api/sockets_tcp_server/tcp_server_socket_event_dispatcher.cc",
157       "api/sockets_tcp_server/tcp_server_socket_event_dispatcher.h",
158       "api/sockets_udp/sockets_udp_api.cc",
159       "api/sockets_udp/sockets_udp_api.h",
160       "api/sockets_udp/udp_socket_event_dispatcher.cc",
161       "api/sockets_udp/udp_socket_event_dispatcher.h",
162       "api/storage/leveldb_settings_storage_factory.cc",
163       "api/storage/leveldb_settings_storage_factory.h",
164       "api/storage/local_value_store_cache.cc",
165       "api/storage/local_value_store_cache.h",
166       "api/storage/settings_namespace.cc",
167       "api/storage/settings_namespace.h",
168       "api/storage/settings_observer.h",
169       "api/storage/settings_storage_factory.h",
170       "api/storage/settings_storage_quota_enforcer.cc",
171       "api/storage/settings_storage_quota_enforcer.h",
172       "api/storage/storage_api.cc",
173       "api/storage/storage_api.h",
174       "api/storage/storage_frontend.cc",
175       "api/storage/storage_frontend.h",
176       "api/storage/value_store_cache.cc",
177       "api/storage/value_store_cache.h",
178       "api/storage/weak_unlimited_settings_storage.cc",
179       "api/storage/weak_unlimited_settings_storage.h",
180       "api/system_cpu/cpu_info_provider.cc",
181       "api/system_cpu/cpu_info_provider.h",
182       "api/system_cpu/cpu_info_provider_linux.cc",
183       "api/system_cpu/cpu_info_provider_mac.cc",
184       "api/system_cpu/cpu_info_provider_win.cc",
185       "api/system_cpu/system_cpu_api.cc",
186       "api/system_cpu/system_cpu_api.h",
187       "api/system_display/display_info_provider.cc",
188       "api/system_display/display_info_provider.h",
189       "api/system_display/system_display_api.cc",
190       "api/system_display/system_display_api.h",
191       "api/system_info/system_info_api.cc",
192       "api/system_info/system_info_api.h",
193       "api/system_info/system_info_provider.cc",
194       "api/system_info/system_info_provider.h",
195       "api/system_memory/memory_info_provider.cc",
196       "api/system_memory/memory_info_provider.h",
197       "api/system_memory/system_memory_api.cc",
198       "api/system_memory/system_memory_api.h",
199       "api/system_network/system_network_api.cc",
200       "api/system_network/system_network_api.h",
201       "api/system_storage/storage_info_provider.cc",
202       "api/system_storage/storage_info_provider.h",
203       "api/system_storage/system_storage_api.cc",
204       "api/system_storage/system_storage_api.h",
205       "api/test/test_api.cc",
206       "api/test/test_api.h",
207       "api/usb/usb_api.cc",
208       "api/usb/usb_api.h",
209       "api/usb/usb_device_resource.cc",
210       "api/usb/usb_device_resource.h",
211       "api/usb_private/usb_private_api.cc",
212       "api/usb_private/usb_private_api.h",
213       "api/web_request/web_request_api_utils.cc",
214       "api/web_request/web_request_api_utils.h",
215       "api/web_view/web_view_internal_api.cc",
216       "api/web_view/web_view_internal_api.h",
217       "api_activity_monitor.h",
218       "app_sorting.h",
219       "app_window/app_delegate.h",
220       "app_window/app_web_contents_helper.cc",
221       "app_window/app_web_contents_helper.h",
222       "app_window/app_window.cc",
223       "app_window/app_window.h",
224       "app_window/app_window_contents.cc",
225       "app_window/app_window_contents.h",
226       "app_window/app_window_geometry_cache.cc",
227       "app_window/app_window_geometry_cache.h",
228       "app_window/app_window_registry.cc",
229       "app_window/app_window_registry.h",
230       "app_window/apps_client.cc",
231       "app_window/apps_client.h",
232       "app_window/native_app_window.h",
233       "app_window/size_constraints.cc",
234       "app_window/size_constraints.h",
235       "blacklist_state.h",
236       "blob_holder.cc",
237       "blob_holder.h",
238       "browser_context_keyed_api_factory.h",
239       "browser_context_keyed_service_factories.cc",
240       "browser_context_keyed_service_factories.h",
241       "component_extension_resource_manager.h",
242       "computed_hashes.cc",
243       "computed_hashes.h",
244       "content_hash_fetcher.cc",
245       "content_hash_fetcher.h",
246       "content_hash_reader.cc",
247       "content_hash_reader.h",
248       "content_hash_tree.cc",
249       "content_hash_tree.h",
250       "content_verifier.cc",
251       "content_verifier.h",
252       "content_verifier_delegate.h",
253       "content_verifier_io_data.cc",
254       "content_verifier_io_data.h",
255       "content_verify_job.cc",
256       "content_verify_job.h",
257       "error_map.cc",
258       "error_map.h",
259       "event_listener_map.cc",
260       "event_listener_map.h",
261       "event_router.cc",
262       "event_router.h",
263       "extension_error.cc",
264       "extension_error.h",
265       "extension_function.cc",
266       "extension_function.h",
267       "extension_function_dispatcher.cc",
268       "extension_function_dispatcher.h",
269       "extension_function_registry.cc",
270       "extension_function_registry.h",
271       "extension_function_util.cc",
272       "extension_function_util.h",
273       "extension_host.cc",
274       "extension_host.h",
275       "extension_host_delegate.h",
276       "extension_icon_image.cc",
277       "extension_icon_image.h",
278       "extension_message_filter.cc",
279       "extension_message_filter.h",
280       "extension_pref_store.cc",
281       "extension_pref_store.h",
282       "extension_pref_value_map.cc",
283       "extension_pref_value_map.h",
284       "extension_pref_value_map_factory.cc",
285       "extension_pref_value_map_factory.h",
286       "extension_prefs.cc",
287       "extension_prefs.h",
288       "extension_prefs_factory.cc",
289       "extension_prefs_factory.h",
290       "extension_prefs_observer.h",
291       "extension_prefs_scope.h",
292       "extension_protocols.cc",
293       "extension_protocols.h",
294       "extension_registry.cc",
295       "extension_registry.h",
296       "extension_registry_factory.cc",
297       "extension_registry_factory.h",
298       "extension_registry_observer.h",
299       "extension_scoped_prefs.h",
300       "extension_system.cc",
301       "extension_system.h",
302       "extension_system_provider.cc",
303       "extension_system_provider.h",
304       "extension_util.cc",
305       "extension_util.h",
306       "extension_web_contents_observer.cc",
307       "extension_web_contents_observer.h",
308       "extensions_browser_client.cc",
309       "extensions_browser_client.h",
310       "external_provider_interface.h",
311       "file_highlighter.cc",
312       "file_highlighter.h",
313       "file_reader.cc",
314       "file_reader.h",
315       "granted_file_entry.cc",
316       "granted_file_entry.h",
317       "guest_view/app_view/app_view_constants.cc",
318       "guest_view/app_view/app_view_constants.h",
319       "guest_view/app_view/app_view_guest.cc",
320       "guest_view/app_view/app_view_guest.h",
321       "guest_view/app_view/app_view_guest_delegate.cc",
322       "guest_view/app_view/app_view_guest_delegate.h",
323       "guest_view/extension_options/extension_options_constants.cc",
324       "guest_view/extension_options/extension_options_constants.h",    
325       "guest_view/extension_options/extension_options_guest.cc",
326       "guest_view/extension_options/extension_options_guest.h",
327       "guest_view/extension_options/extension_options_guest_delegate.cc",
328       "guest_view/extension_options/extension_options_guest_delegate.h",
329       "guest_view/guest_view_base.cc",
330       "guest_view/guest_view_base.h",
331       "guest_view/guest_view_constants.cc",
332       "guest_view/guest_view_constants.h",
333       "guest_view/guest_view_manager_factory.h",
334       "guest_view/guest_view_manager.cc",
335       "guest_view/guest_view_manager.h",
336       "guest_view/guest_view.h",
337       "guest_view/mime_handler_view/mime_handler_view_constants.cc",
338       "guest_view/mime_handler_view/mime_handler_view_constants.h",
339       "guest_view/mime_handler_view/mime_handler_view_guest.h",
340       "guest_view/mime_handler_view/mime_handler_view_guest.cc",
341       "guest_view/mime_handler_view/mime_handler_view_guest_delegate.h",
342       "guest_view/web_view/javascript_dialog_helper.cc",
343       "guest_view/web_view/javascript_dialog_helper.h",
344       "guest_view/web_view/web_view_constants.cc",
345       "guest_view/web_view/web_view_constants.h",
346       "guest_view/web_view/web_view_find_helper.cc",
347       "guest_view/web_view/web_view_find_helper.h",
348       "guest_view/web_view/web_view_guest.cc",
349       "guest_view/web_view/web_view_guest.h",
350       "guest_view/web_view/web_view_guest_delegate.cc",
351       "guest_view/web_view/web_view_guest_delegate.h",
352       "guest_view/web_view/web_view_permission_types.h",
353       "guest_view/web_view/web_view_permission_helper.cc",
354       "guest_view/web_view/web_view_permission_helper.h",
355       "guest_view/web_view/web_view_permission_helper_delegate.cc",
356       "guest_view/web_view/web_view_permission_helper_delegate.h",
357       "guest_view/web_view/web_view_renderer_state.cc",
358       "guest_view/web_view/web_view_renderer_state.h",
359       "image_loader.cc",
360       "image_loader.h",
361       "image_loader_factory.cc",
362       "image_loader_factory.h",
363       "image_util.cc",
364       "image_util.h",
365       "info_map.cc",
366       "info_map.h",
367       "install_flag.h",
368       "lazy_background_task_queue.cc",
369       "lazy_background_task_queue.h",
370       "management_policy.cc",
371       "management_policy.h",
372       "pref_names.cc",
373       "pref_names.h",
374       "process_manager.cc",
375       "process_manager.h",
376       "process_manager_delegate.h",
377       "process_manager_observer.h",
378       "process_map.cc",
379       "process_map.h",
380       "process_map_factory.cc",
381       "process_map_factory.h",
382       "quota_service.cc",
383       "quota_service.h",
384       "renderer_startup_helper.cc",
385       "renderer_startup_helper.h",
386       "runtime_data.cc",
387       "runtime_data.h",
388       "script_execution_observer.h",
389       "script_executor.cc",
390       "script_executor.h",
391       "state_store.cc",
392       "state_store.h",
393       "suggest_permission_util.cc",
394       "suggest_permission_util.h",
395       "uninstall_reason.h",
396       "update_observer.h",
397       "value_store/leveldb_value_store.cc",
398       "value_store/leveldb_value_store.h",
399       "value_store/testing_value_store.cc",
400       "value_store/testing_value_store.h",
401       "value_store/value_store.cc",
402       "value_store/value_store.h",
403       "value_store/value_store_change.cc",
404       "value_store/value_store_change.h",
405       "value_store/value_store_frontend.cc",
406       "value_store/value_store_frontend.h",
407       "value_store/value_store_util.cc",
408       "value_store/value_store_util.h",
409       "verified_contents.cc",
410       "verified_contents.h",
411       "view_type_utils.cc",
412       "view_type_utils.h",
413       "warning_service.cc",
414       "warning_service.h",
415       "warning_set.cc",
416       "warning_set.h",
417     ]
419     deps += [
420       "//components/storage_monitor",
421       "//crypto:platform",
422       "//device/bluetooth",
423       "//device/core",
424       "//device/hid",
425       "//device/serial",
426       "//device/usb",
427       "//extensions/browser/api/cast_channel:cast_channel_proto",
428     ]
430     if (use_openssl) {
431       sources += [
432         "api/cast_channel/cast_auth_util_openssl.cc",
433       ]
434     } else {
435       sources += [
436         "api/cast_channel/cast_auth_util_nss.cc",
437       ]
438     }
439   }
441   if (is_win) {
442     cflags = [
443       "/wd4267", # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
444     ]
445   }