Update mojo surfaces bindings and mojo/cc/ glue
[chromium-blink-merge.git] / extensions / extensions.gyp
blob317ab92095cdf23f5f6ad98dada49618ca94e150
1 # Copyright 2013 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.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'targets': [
10     {
11       # GN version: //extensions/common
12       'target_name': 'extensions_common',
13       'type': 'static_library',
14       'dependencies': [
15         # TODO(benwells): figure out what to do with the api target and
16         # api resources compiled into the chrome resource bundle.
17         # http://crbug.com/162530
18         '../chrome/chrome_resources.gyp:chrome_resources',
19         '../components/components.gyp:crx_file',
20         '../components/components.gyp:url_matcher',
21         '../content/content.gyp:content_common',
22         '../crypto/crypto.gyp:crypto',
23         '../ipc/ipc.gyp:ipc',
24         '../net/net.gyp:net',
25         '../third_party/re2/re2.gyp:re2',
26         '../ui/base/ui_base.gyp:ui_base',
27         '../ui/gfx/gfx.gyp:gfx_geometry',
28         '../ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
29         '../url/url.gyp:url_lib',
30         '../third_party/libxml/libxml.gyp:libxml',
31         'common/api/api.gyp:extensions_api',
32         'extensions_strings.gyp:extensions_strings',
33       ],
34       'include_dirs': [
35         '..',
36         '<(INTERMEDIATE_DIR)',
37       ],
38       'sources': [
39         'common/api/messaging/message.h',
40         'common/api/sockets/sockets_manifest_data.cc',
41         'common/api/sockets/sockets_manifest_data.h',
42         'common/api/sockets/sockets_manifest_handler.cc',
43         'common/api/sockets/sockets_manifest_handler.h',
44         'common/api/sockets/sockets_manifest_permission.cc',
45         'common/api/sockets/sockets_manifest_permission.h',
46         'common/common_manifest_handlers.cc',
47         'common/common_manifest_handlers.h',
48         'common/constants.cc',
49         'common/constants.h',
50         'common/csp_validator.cc',
51         'common/csp_validator.h',
52         'common/dom_action_types.h',
53         'common/draggable_region.cc',
54         'common/draggable_region.h',
55         'common/error_utils.cc',
56         'common/error_utils.h',
57         'common/event_filter.cc',
58         'common/event_filter.h',
59         'common/event_filtering_info.cc',
60         'common/event_filtering_info.h',
61         'common/event_matcher.cc',
62         'common/event_matcher.h',
63         'common/extension.cc',
64         'common/extension.h',
65         'common/extension_api.cc',
66         'common/extension_api.h',
67         'common/extension_api_stub.cc',
68         'common/extension_icon_set.cc',
69         'common/extension_icon_set.h',
70         'common/extension_l10n_util.cc',
71         'common/extension_l10n_util.h',
72         'common/extension_message_generator.cc',
73         'common/extension_message_generator.h',
74         'common/extension_messages.cc',
75         'common/extension_messages.h',
76         'common/extension_paths.cc',
77         'common/extension_paths.h',
78         'common/extension_resource.cc',
79         'common/extension_resource.h',
80         'common/extension_set.cc',
81         'common/extension_set.h',
82         'common/extension_urls.cc',
83         'common/extension_urls.h',
84         'common/extensions_client.cc',
85         'common/extensions_client.h',
86         'common/feature_switch.cc',
87         'common/feature_switch.h',
88         'common/features/api_feature.cc',
89         'common/features/api_feature.h',
90         'common/features/base_feature_provider.cc',
91         'common/features/base_feature_provider.h',
92         'common/features/complex_feature.cc',
93         'common/features/complex_feature.h',
94         'common/features/feature.cc',
95         'common/features/feature.h',
96         'common/features/feature_provider.cc',
97         'common/features/feature_provider.h',
98         'common/features/json_feature_provider_source.cc',
99         'common/features/json_feature_provider_source.h',
100         'common/features/manifest_feature.cc',
101         'common/features/manifest_feature.h',
102         'common/features/permission_feature.cc',
103         'common/features/permission_feature.h',
104         'common/features/simple_feature.cc',
105         'common/features/simple_feature.h',
106         'common/features/simple_feature_filter.cc',
107         'common/features/simple_feature_filter.h',
108         'common/file_util.cc',
109         'common/file_util.h',
110         'common/install_warning.cc',
111         'common/install_warning.h',
112         'common/manifest.cc',
113         'common/manifest.h',
114         'common/manifest_constants.cc',
115         'common/manifest_constants.h',
116         'common/manifest_handler.cc',
117         'common/manifest_handler.h',
118         'common/manifest_handler_helpers.cc',
119         'common/manifest_handler_helpers.h',
120         'common/manifest_handlers/background_info.cc',
121         'common/manifest_handlers/background_info.h',
122         'common/manifest_handlers/csp_info.cc',
123         'common/manifest_handlers/csp_info.h',
124         'common/manifest_handlers/externally_connectable.cc',
125         'common/manifest_handlers/externally_connectable.h',
126         'common/manifest_handlers/file_handler_info.cc',
127         'common/manifest_handlers/file_handler_info.h',
128         'common/manifest_handlers/icons_handler.cc',
129         'common/manifest_handlers/icons_handler.h',
130         'common/manifest_handlers/incognito_info.cc',
131         'common/manifest_handlers/incognito_info.h',
132         'common/manifest_handlers/kiosk_mode_info.cc',
133         'common/manifest_handlers/kiosk_mode_info.h',
134         'common/manifest_handlers/offline_enabled_info.cc',
135         'common/manifest_handlers/offline_enabled_info.h',
136         'common/manifest_handlers/permissions_parser.cc',
137         'common/manifest_handlers/permissions_parser.h',
138         'common/manifest_handlers/requirements_info.cc',
139         'common/manifest_handlers/requirements_info.h',
140         'common/manifest_handlers/sandboxed_page_info.cc',
141         'common/manifest_handlers/sandboxed_page_info.h',
142         'common/manifest_handlers/shared_module_info.cc',
143         'common/manifest_handlers/shared_module_info.h',
144         'common/manifest_handlers/web_accessible_resources_info.cc',
145         'common/manifest_handlers/web_accessible_resources_info.h',
146         'common/manifest_handlers/webview_info.cc',
147         'common/manifest_handlers/webview_info.h',
148         'common/message_bundle.cc',
149         'common/message_bundle.h',
150         'common/one_shot_event.cc',
151         'common/one_shot_event.h',
152         'common/permissions/api_permission.cc',
153         'common/permissions/api_permission.h',
154         'common/permissions/api_permission_set.cc',
155         'common/permissions/api_permission_set.h',
156         'common/permissions/base_set_operators.h',
157         'common/permissions/extensions_api_permissions.cc',
158         'common/permissions/extensions_api_permissions.h',
159         'common/permissions/manifest_permission.cc',
160         'common/permissions/manifest_permission.h',
161         'common/permissions/manifest_permission_set.cc',
162         'common/permissions/manifest_permission_set.h',
163         'common/permissions/media_galleries_permission.cc',
164         'common/permissions/media_galleries_permission.h',
165         'common/permissions/media_galleries_permission_data.cc',
166         'common/permissions/media_galleries_permission_data.h',
167         'common/permissions/permission_message.cc',
168         'common/permissions/permission_message.h',
169         'common/permissions/permission_message_provider.cc',
170         'common/permissions/permission_message_provider.h',
171         'common/permissions/permission_message_util.cc',
172         'common/permissions/permission_message_util.h',
173         'common/permissions/permission_set.cc',
174         'common/permissions/permission_set.h',
175         'common/permissions/permissions_data.cc',
176         'common/permissions/permissions_data.h',
177         'common/permissions/permissions_info.cc',
178         'common/permissions/permissions_info.h',
179         'common/permissions/permissions_provider.h',
180         'common/permissions/set_disjunction_permission.h',
181         'common/permissions/settings_override_permission.cc',
182         'common/permissions/settings_override_permission.h',
183         'common/permissions/socket_permission.cc',
184         'common/permissions/socket_permission.h',
185         'common/permissions/socket_permission_data.cc',
186         'common/permissions/socket_permission_data.h',
187         'common/permissions/socket_permission_entry.cc',
188         'common/permissions/socket_permission_entry.h',
189         'common/permissions/usb_device_permission.cc',
190         'common/permissions/usb_device_permission.h',
191         'common/permissions/usb_device_permission_data.cc',
192         'common/permissions/usb_device_permission_data.h',
193         'common/stack_frame.cc',
194         'common/stack_frame.h',
195         'common/switches.cc',
196         'common/switches.h',
197         'common/url_pattern.cc',
198         'common/url_pattern.h',
199         'common/url_pattern_set.cc',
200         'common/url_pattern_set.h',
201         'common/update_manifest.cc',
202         'common/update_manifest.h',
203         'common/user_script.cc',
204         'common/user_script.h',
205         'common/value_counter.cc',
206         'common/value_counter.h',
207         'common/view_type.cc',
208         'common/view_type.h',
209       ],
210       # Disable c4267 warnings until we fix size_t to int truncations.
211       'msvs_disabled_warnings': [ 4267, ],
212       'conditions': [
213         ['enable_extensions==1', {
214           'dependencies': [
215             # For Mojo generated headers for generated_api.cc.
216             '../device/serial/serial.gyp:device_serial_mojo',
217             '../device/usb/usb.gyp:device_usb',
218           ],
219           'sources!': [
220             'common/extension_api_stub.cc',
221           ],
222         }, {  # enable_extensions == 0
223           'sources!': [
224             'common/api/messaging/message.h',
225             'common/api/sockets/sockets_manifest_data.cc',
226             'common/api/sockets/sockets_manifest_data.h',
227             'common/api/sockets/sockets_manifest_handler.cc',
228             'common/api/sockets/sockets_manifest_handler.h',
229             'common/api/sockets/sockets_manifest_permission.cc',
230             'common/api/sockets/sockets_manifest_permission.h',
231             'common/extension_api.cc',
232             'common/manifest_handlers/externally_connectable.cc',
233             'common/manifest_handlers/externally_connectable.h',
234           ],
235         }],
236         ['disable_nacl==0', {
237           # NaClModulesHandler does not use any code in NaCl, so no dependency
238           # on nacl_common.
239           'sources': [
240             'common/manifest_handlers/nacl_modules_handler.cc',
241             'common/manifest_handlers/nacl_modules_handler.h',
242           ],
243         }],
244       ],
245     },
246     {
247       # GN version: //extensions/browser
248       'target_name': 'extensions_browser',
249       'type': 'static_library',
250       'dependencies': [
251         '../base/base.gyp:base',
252         '../base/base.gyp:base_prefs',
253         '../components/components.gyp:keyed_service_content',
254         '../components/components.gyp:keyed_service_core',
255         '../components/components.gyp:pref_registry',
256         '../components/components.gyp:usb_service',
257         '../components/components.gyp:web_modal',
258         '../content/content.gyp:content_browser',
259         '../device/serial/serial.gyp:device_serial',
260         '../skia/skia.gyp:skia',
261         '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
262         'cast_channel_proto',
263         'common/api/api.gyp:extensions_api',
264         'extensions_common',
265         'extensions_strings.gyp:extensions_strings',
266       ],
267       'include_dirs': [
268         '..',
269         '<(INTERMEDIATE_DIR)',
270         # Needed to access generated API headers.
271         '<(SHARED_INTERMEDIATE_DIR)',
272         # Needed for grit.
273         '<(SHARED_INTERMEDIATE_DIR)/chrome',
274       ],
275       'sources': [
276         # Note: sources list duplicated in GN build.
277         'browser/admin_policy.cc',
278         'browser/admin_policy.h',
279         # NOTE: When moving an API out of Chrome be sure to verify that the
280         # Android build still compiles. See conditions below.
281         'browser/api/api_resource.cc',
282         'browser/api/api_resource.h',
283         'browser/api/api_resource_manager.h',
284         'browser/api/app_runtime/app_runtime_api.cc',
285         'browser/api/app_runtime/app_runtime_api.h',
286         'browser/api/app_view/app_view_internal_api.cc',
287         'browser/api/app_view/app_view_internal_api.h',
288         'browser/api/async_api_function.cc',
289         'browser/api/async_api_function.h',
290         'browser/api/cast_channel/cast_auth_util.cc',
291         'browser/api/cast_channel/cast_auth_util.h',
292         'browser/api/cast_channel/cast_channel_api.cc',
293         'browser/api/cast_channel/cast_channel_api.h',
294         'browser/api/cast_channel/cast_message_util.cc',
295         'browser/api/cast_channel/cast_message_util.h',
296         'browser/api/cast_channel/cast_socket.cc',
297         'browser/api/cast_channel/cast_socket.h',
298         'browser/api/cast_channel/logger.cc',
299         'browser/api/cast_channel/logger.h',
300         'browser/api/cast_channel/logger_util.cc',
301         'browser/api/cast_channel/logger_util.h',
302         'browser/api/dns/dns_api.cc',
303         'browser/api/dns/dns_api.h',
304         'browser/api/dns/host_resolver_wrapper.cc',
305         'browser/api/dns/host_resolver_wrapper.h',
306         'browser/api/extensions_api_client.cc',
307         'browser/api/extensions_api_client.h',
308         'browser/api/hid/hid_api.cc',
309         'browser/api/hid/hid_api.h',
310         'browser/api/hid/hid_connection_resource.cc',
311         'browser/api/hid/hid_connection_resource.h',
312         'browser/api/hid/hid_device_manager.cc',
313         'browser/api/hid/hid_device_manager.h',
314         'browser/api/power/power_api.cc',
315         'browser/api/power/power_api.h',
316         'browser/api/power/power_api_manager.cc',
317         'browser/api/power/power_api_manager.h',
318         'browser/api/runtime/runtime_api.cc',
319         'browser/api/runtime/runtime_api.h',
320         'browser/api/runtime/runtime_api_delegate.cc',
321         'browser/api/runtime/runtime_api_delegate.h',
322         'browser/api/serial/serial_api.cc',
323         'browser/api/serial/serial_api.h',
324         'browser/api/serial/serial_connection.cc',
325         'browser/api/serial/serial_connection.h',
326         'browser/api/serial/serial_event_dispatcher.cc',
327         'browser/api/serial/serial_event_dispatcher.h',
328         'browser/api/socket/socket.cc',
329         'browser/api/socket/socket.h',
330         'browser/api/socket/socket_api.cc',
331         'browser/api/socket/socket_api.h',
332         'browser/api/socket/tcp_socket.cc',
333         'browser/api/socket/tcp_socket.h',
334         'browser/api/socket/tls_socket.cc',
335         'browser/api/socket/tls_socket.h',
336         'browser/api/socket/udp_socket.cc',
337         'browser/api/socket/udp_socket.h',
338         'browser/api/sockets_tcp/sockets_tcp_api.cc',
339         'browser/api/sockets_tcp/sockets_tcp_api.h',
340         'browser/api/sockets_tcp/tcp_socket_event_dispatcher.cc',
341         'browser/api/sockets_tcp/tcp_socket_event_dispatcher.h',
342         'browser/api/sockets_tcp_server/sockets_tcp_server_api.cc',
343         'browser/api/sockets_tcp_server/sockets_tcp_server_api.h',
344         'browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.cc',
345         'browser/api/sockets_tcp_server/tcp_server_socket_event_dispatcher.h',
346         'browser/api/sockets_udp/sockets_udp_api.cc',
347         'browser/api/sockets_udp/sockets_udp_api.h',
348         'browser/api/sockets_udp/udp_socket_event_dispatcher.cc',
349         'browser/api/sockets_udp/udp_socket_event_dispatcher.h',
350         'browser/api/storage/leveldb_settings_storage_factory.cc',
351         'browser/api/storage/leveldb_settings_storage_factory.h',
352         'browser/api/storage/local_value_store_cache.cc',
353         'browser/api/storage/local_value_store_cache.h',
354         'browser/api/storage/settings_namespace.cc',
355         'browser/api/storage/settings_namespace.h',
356         'browser/api/storage/settings_observer.h',
357         'browser/api/storage/settings_storage_factory.h',
358         'browser/api/storage/settings_storage_quota_enforcer.cc',
359         'browser/api/storage/settings_storage_quota_enforcer.h',
360         'browser/api/storage/storage_api.cc',
361         'browser/api/storage/storage_api.h',
362         'browser/api/storage/storage_frontend.cc',
363         'browser/api/storage/storage_frontend.h',
364         'browser/api/storage/value_store_cache.cc',
365         'browser/api/storage/value_store_cache.h',
366         'browser/api/storage/weak_unlimited_settings_storage.cc',
367         'browser/api/storage/weak_unlimited_settings_storage.h',
368         'browser/api/test/test_api.cc',
369         'browser/api/test/test_api.h',
370         'browser/api/usb/usb_api.cc',
371         'browser/api/usb/usb_api.h',
372         'browser/api/usb/usb_device_resource.cc',
373         'browser/api/usb/usb_device_resource.h',
374         'browser/api/usb_private/usb_private_api.cc',
375         'browser/api/usb_private/usb_private_api.h',
376         'browser/api_activity_monitor.h',
377         'browser/app_sorting.h',
378         'browser/app_window/app_delegate.h',
379         'browser/app_window/app_web_contents_helper.cc',
380         'browser/app_window/app_web_contents_helper.h',
381         'browser/app_window/app_window_geometry_cache.cc',
382         'browser/app_window/app_window_geometry_cache.h',
383         'browser/app_window/native_app_window.h',
384         'browser/app_window/size_constraints.cc',
385         'browser/app_window/size_constraints.h',
386         'browser/blacklist_state.h',
387         'browser/blob_holder.cc',
388         'browser/blob_holder.h',
389         'browser/browser_context_keyed_api_factory.h',
390         'browser/browser_context_keyed_service_factories.cc',
391         'browser/browser_context_keyed_service_factories.h',
392         'browser/component_extension_resource_manager.h',
393         'browser/computed_hashes.cc',
394         'browser/computed_hashes.h',
395         'browser/content_hash_fetcher.cc',
396         'browser/content_hash_fetcher.h',
397         'browser/content_hash_reader.cc',
398         'browser/content_hash_reader.h',
399         'browser/content_hash_tree.cc',
400         'browser/content_hash_tree.h',
401         'browser/content_verifier.cc',
402         'browser/content_verifier.h',
403         'browser/content_verifier_delegate.h',
404         'browser/content_verifier_io_data.cc',
405         'browser/content_verifier_io_data.h',
406         'browser/content_verify_job.cc',
407         'browser/content_verify_job.h',
408         'browser/error_map.cc',
409         'browser/error_map.h',
410         'browser/event_listener_map.cc',
411         'browser/event_listener_map.h',
412         'browser/event_router.cc',
413         'browser/event_router.h',
414         'browser/extension_host.cc',
415         'browser/extension_host.h',
416         'browser/extension_host_delegate.h',
417         'browser/extension_error.cc',
418         'browser/extension_error.h',
419         'browser/extension_function.cc',
420         'browser/extension_function.h',
421         'browser/extension_function_dispatcher.cc',
422         'browser/extension_function_dispatcher.h',
423         'browser/extension_function_registry.cc',
424         'browser/extension_function_registry.h',
425         'browser/extension_function_util.cc',
426         'browser/extension_function_util.h',
427         'browser/extension_icon_image.cc',
428         'browser/extension_icon_image.h',
429         'browser/extension_message_filter.cc',
430         'browser/extension_message_filter.h',
431         'browser/extension_pref_store.cc',
432         'browser/extension_pref_store.h',
433         'browser/extension_pref_value_map.cc',
434         'browser/extension_pref_value_map_factory.cc',
435         'browser/extension_pref_value_map_factory.h',
436         'browser/extension_pref_value_map.h',
437         'browser/extension_prefs.cc',
438         'browser/extension_prefs.h',
439         'browser/extension_prefs_factory.cc',
440         'browser/extension_prefs_factory.h',
441         'browser/extension_prefs_observer.h',
442         'browser/extension_prefs_scope.h',
443         'browser/extension_protocols.cc',
444         'browser/extension_protocols.h',
445         'browser/extension_registry.cc',
446         'browser/extension_registry.h',
447         'browser/extension_registry_factory.cc',
448         'browser/extension_registry_factory.h',
449         'browser/extension_registry_observer.h',
450         'browser/extension_scoped_prefs.h',
451         'browser/extension_system.cc',
452         'browser/extension_system.h',
453         'browser/extension_system_provider.cc',
454         'browser/extension_system_provider.h',
455         'browser/extension_util.cc',
456         'browser/extension_util.h',
457         'browser/extension_web_contents_observer.cc',
458         'browser/extension_web_contents_observer.h',
459         'browser/extensions_browser_client.cc',
460         'browser/extensions_browser_client.h',
461         'browser/external_provider_interface.h',
462         'browser/granted_file_entry.cc',
463         'browser/granted_file_entry.h',
464         'browser/guest_view/app_view/app_view_constants.cc',
465         'browser/guest_view/app_view/app_view_constants.h',
466         'browser/guest_view/app_view/app_view_guest.cc',
467         'browser/guest_view/app_view/app_view_guest.h',
468         'browser/guest_view/app_view/app_view_guest_delegate.cc',
469         'browser/guest_view/app_view/app_view_guest_delegate.h',
470         'browser/guest_view/guest_view_base.cc',
471         'browser/guest_view/guest_view_base.h',
472         'browser/guest_view/guest_view_constants.cc',
473         'browser/guest_view/guest_view_constants.h',
474         'browser/guest_view/guest_view_manager_factory.h',
475         'browser/guest_view/guest_view_manager.cc',
476         'browser/guest_view/guest_view_manager.h',
477         'browser/guest_view/guest_view.h',
478         'browser/guest_view/web_view/javascript_dialog_helper.cc',
479         'browser/guest_view/web_view/javascript_dialog_helper.h',
480         'browser/guest_view/web_view/web_view_constants.cc',
481         'browser/guest_view/web_view/web_view_constants.h',
482         'browser/guest_view/web_view/web_view_find_helper.cc',
483         'browser/guest_view/web_view/web_view_find_helper.h',
484         'browser/guest_view/web_view/web_view_guest.cc',
485         'browser/guest_view/web_view/web_view_guest.h',
486         'browser/guest_view/web_view/web_view_guest_delegate.cc',
487         'browser/guest_view/web_view/web_view_guest_delegate.h',
488         'browser/guest_view/web_view/web_view_permission_types.h',
489         'browser/guest_view/web_view/web_view_permission_helper.cc',
490         'browser/guest_view/web_view/web_view_permission_helper.h',
491         'browser/guest_view/web_view/web_view_permission_helper_delegate.cc',
492         'browser/guest_view/web_view/web_view_permission_helper_delegate.h',
493         'browser/guest_view/web_view/web_view_renderer_state.cc',
494         'browser/guest_view/web_view/web_view_renderer_state.h',
495         'browser/image_loader.cc',
496         'browser/image_loader.h',
497         'browser/image_loader_factory.cc',
498         'browser/image_loader_factory.h',
499         'browser/image_util.cc',
500         'browser/image_util.h',
501         'browser/info_map.cc',
502         'browser/info_map.h',
503         'browser/install_flag.h',
504         'browser/file_highlighter.cc',
505         'browser/file_highlighter.h',
506         'browser/file_reader.cc',
507         'browser/file_reader.h',
508         'browser/lazy_background_task_queue.cc',
509         'browser/lazy_background_task_queue.h',
510         'browser/management_policy.cc',
511         'browser/management_policy.h',
512         'browser/notification_types.h',
513         'browser/pref_names.cc',
514         'browser/pref_names.h',
515         'browser/process_manager.cc',
516         'browser/process_manager.h',
517         'browser/process_manager_delegate.h',
518         'browser/process_manager_observer.h',
519         'browser/process_map.cc',
520         'browser/process_map.h',
521         'browser/process_map_factory.cc',
522         'browser/process_map_factory.h',
523         'browser/quota_service.cc',
524         'browser/quota_service.h',
525         'browser/renderer_startup_helper.cc',
526         'browser/renderer_startup_helper.h',
527         'browser/runtime_data.cc',
528         'browser/runtime_data.h',
529         'browser/script_execution_observer.h',
530         'browser/script_executor.cc',
531         'browser/script_executor.h',
532         'browser/state_store.cc',
533         'browser/state_store.h',
534         'browser/suggest_permission_util.cc',
535         'browser/suggest_permission_util.h',
536         'browser/uninstall_reason.h',
537         'browser/update_observer.h',
538         'browser/value_store/leveldb_value_store.cc',
539         'browser/value_store/leveldb_value_store.h',
540         'browser/value_store/testing_value_store.cc',
541         'browser/value_store/testing_value_store.h',
542         'browser/value_store/value_store.cc',
543         'browser/value_store/value_store.h',
544         'browser/value_store/value_store_change.cc',
545         'browser/value_store/value_store_change.h',
546         'browser/value_store/value_store_frontend.cc',
547         'browser/value_store/value_store_frontend.h',
548         'browser/value_store/value_store_util.cc',
549         'browser/value_store/value_store_util.h',
550         'browser/verified_contents.cc',
551         'browser/verified_contents.h',
552         'browser/view_type_utils.cc',
553         'browser/view_type_utils.h',
554       ],
555       'conditions': [
556         ['enable_extensions==0', {
557           # Exclude all API implementations and the ExtensionsApiClient
558           # interface. Moving an API from src/chrome to src/extensions implies
559           # it can be cleanly disabled with enable_extensions==0.
560           # TODO: Eventually the entire extensions module should not be built
561           # when enable_extensions==0.
562           'sources/': [
563             ['exclude', '^browser/'],
564           ],
565           'dependencies!': [
566             '../components/components.gyp:usb_service',
567             '../device/serial/serial.gyp:device_serial',
568           ],
569         }],
570         ['use_openssl==1', {
571           'sources': [
572             'browser/api/cast_channel/cast_auth_util_openssl.cc',
573           ],
574         }, {
575           'sources': [
576             # cast_auth_util_nss.cc uses NSS functions.
577             'browser/api/cast_channel/cast_auth_util_nss.cc',
578           ],
579         }],
580         ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
581           'dependencies': [
582             '../build/linux/system.gyp:ssl',
583           ],
584         }],
585         ['OS == "mac" or OS == "ios" or OS == "win"', {
586           'dependencies': [
587             '../third_party/nss/nss.gyp:nspr',
588             '../third_party/nss/nss.gyp:nss',
589           ],
590         }],
591       ],
592       # Disable c4267 warnings until we fix size_t to int truncations.
593       'msvs_disabled_warnings': [ 4267, ],
594     },
595     {
596       # GN version: //extensions/renderer
597       'target_name': 'extensions_renderer',
598       'type': 'static_library',
599       'dependencies': [
600         'extensions_resources.gyp:extensions_resources',
601         '../chrome/chrome_resources.gyp:chrome_resources',
602         '../content/content_resources.gyp:content_resources',
603         '../gin/gin.gyp:gin',
604         '../mojo/mojo_base.gyp:mojo_js_bindings',
605         '../third_party/WebKit/public/blink.gyp:blink',
606       ],
607       'include_dirs': [
608         '..',
609       ],
610       'sources': [
611         'renderer/activity_log_converter_strategy.cc',
612         'renderer/activity_log_converter_strategy.h',
613         'renderer/api_activity_logger.cc',
614         'renderer/api_activity_logger.h',
615         'renderer/api_definitions_natives.cc',
616         'renderer/api_definitions_natives.h',
617         'renderer/app_runtime_custom_bindings.cc',
618         'renderer/app_runtime_custom_bindings.h',
619         'renderer/binding_generating_native_handler.cc',
620         'renderer/binding_generating_native_handler.h',
621         'renderer/blob_native_handler.cc',
622         'renderer/blob_native_handler.h',
623         'renderer/console.cc',
624         'renderer/console.h',
625         'renderer/content_watcher.cc',
626         'renderer/content_watcher.h',
627         'renderer/context_menus_custom_bindings.cc',
628         'renderer/context_menus_custom_bindings.h',
629         'renderer/css_native_handler.cc',
630         'renderer/css_native_handler.h',
631         'renderer/default_dispatcher_delegate.cc',
632         'renderer/default_dispatcher_delegate.h',
633         'renderer/dispatcher.cc',
634         'renderer/dispatcher.h',
635         'renderer/dispatcher_delegate.h',
636         'renderer/document_custom_bindings.cc',
637         'renderer/document_custom_bindings.h',
638         'renderer/dom_activity_logger.cc',
639         'renderer/dom_activity_logger.h',
640         'renderer/event_bindings.cc',
641         'renderer/event_bindings.h',
642         'renderer/extension_helper.cc',
643         'renderer/extension_helper.h',
644         'renderer/extensions_render_frame_observer.cc',
645         'renderer/extensions_render_frame_observer.h',
646         'renderer/extensions_renderer_client.cc',
647         'renderer/extensions_renderer_client.h',
648         'renderer/extension_groups.h',
649         'renderer/guest_view/guest_view_internal_custom_bindings.cc',
650         'renderer/guest_view/guest_view_internal_custom_bindings.h',
651         'renderer/file_system_natives.cc',
652         'renderer/file_system_natives.h',
653         'renderer/i18n_custom_bindings.cc',
654         'renderer/i18n_custom_bindings.h',
655         'renderer/id_generator_custom_bindings.cc',
656         'renderer/id_generator_custom_bindings.h',
657         'renderer/lazy_background_page_native_handler.cc',
658         'renderer/lazy_background_page_native_handler.h',
659         'renderer/logging_native_handler.cc',
660         'renderer/logging_native_handler.h',
661         'renderer/messaging_bindings.cc',
662         'renderer/messaging_bindings.h',
663         'renderer/module_system.cc',
664         'renderer/module_system.h',
665         'renderer/native_handler.cc',
666         'renderer/native_handler.h',
667         'renderer/object_backed_native_handler.cc',
668         'renderer/object_backed_native_handler.h',
669         'renderer/print_native_handler.cc',
670         'renderer/print_native_handler.h',
671         'renderer/process_info_native_handler.cc',
672         'renderer/process_info_native_handler.h',
673         'renderer/programmatic_script_injector.cc',
674         'renderer/programmatic_script_injector.h',
675         'renderer/render_view_observer_natives.cc',
676         'renderer/render_view_observer_natives.h',
677         'renderer/request_sender.cc',
678         'renderer/request_sender.h',
679         'renderer/resource_bundle_source_map.cc',
680         'renderer/resource_bundle_source_map.h',
681         'renderer/resources/app_runtime_custom_bindings.js',
682         'renderer/resources/binding.js',
683         'renderer/resources/context_menus_custom_bindings.js',
684         'renderer/resources/entry_id_manager.js',
685         'renderer/resources/event.js',
686         'renderer/resources/extension_custom_bindings.js',
687         'renderer/resources/greasemonkey_api.js',
688         'renderer/resources/i18n_custom_bindings.js',
689         'renderer/resources/image_util.js',
690         'renderer/resources/json_schema.js',
691         'renderer/resources/last_error.js',
692         'renderer/resources/messaging.js',
693         'renderer/resources/messaging_utils.js',
694         'renderer/resources/permissions_custom_bindings.js',
695         'renderer/resources/platform_app.css',
696         'renderer/resources/platform_app.js',
697         'renderer/resources/runtime_custom_bindings.js',
698         'renderer/resources/schema_utils.js',
699         'renderer/resources/send_request.js',
700         'renderer/resources/set_icon.js',
701         'renderer/resources/storage_area.js',
702         'renderer/resources/test_custom_bindings.js',
703         'renderer/resources/uncaught_exception_handler.js',
704         'renderer/resources/unload_event.js',
705         'renderer/resources/utils.js',
706         'renderer/runtime_custom_bindings.cc',
707         'renderer/runtime_custom_bindings.h',
708         'renderer/safe_builtins.cc',
709         'renderer/safe_builtins.h',
710         'renderer/send_request_natives.cc',
711         'renderer/send_request_natives.h',
712         'renderer/set_icon_natives.cc',
713         'renderer/set_icon_natives.h',
714         'renderer/scoped_persistent.h',
715         'renderer/script_context.cc',
716         'renderer/script_context.h',
717         'renderer/script_context_set.cc',
718         'renderer/script_context_set.h',
719         'renderer/script_injection.cc',
720         'renderer/script_injection.h',
721         'renderer/script_injection_manager.cc',
722         'renderer/script_injection_manager.h',
723         'renderer/script_injector.h',
724         'renderer/scripts_run_info.cc',
725         'renderer/scripts_run_info.h',
726         'renderer/static_v8_external_ascii_string_resource.cc',
727         'renderer/static_v8_external_ascii_string_resource.h',
728         'renderer/test_features_native_handler.cc',
729         'renderer/test_features_native_handler.h',
730         'renderer/user_gestures_native_handler.cc',
731         'renderer/user_gestures_native_handler.h',
732         'renderer/user_script_injector.cc',
733         'renderer/user_script_injector.h',
734         'renderer/user_script_set.cc',
735         'renderer/user_script_set.h',
736         'renderer/user_script_set_manager.cc',
737         'renderer/user_script_set_manager.h',
738         'renderer/utils_native_handler.cc',
739         'renderer/utils_native_handler.h',
740         'renderer/v8_context_native_handler.cc',
741         'renderer/v8_context_native_handler.h',
742         'renderer/v8_schema_registry.cc',
743         'renderer/v8_schema_registry.h',
744       ],
745       # Disable c4267 warnings until we fix size_t to int truncations.
746       'msvs_disabled_warnings': [ 4267, ],
747       'conditions': [
748         # Temporary conditions for Android until it can stop building
749         # the extensions module altogether. These exemptions are taken
750         # directly from chrome_renderer.gypi as sources are moved
751         # from //chrome/renderer to //extensions/renderer.
752         ['OS == "android"', {
753           'sources!': [
754             'renderer/api_definitions_natives.cc',
755             'renderer/context_menus_custom_bindings.cc',
756             'renderer/render_view_observer_natives.cc',
757             'renderer/send_request_natives.cc',
758           ],
759         }],
760       ]
761     },
762     {
763       # GN version: //extensions:test_support
764       'target_name': 'extensions_test_support',
765       'type': 'static_library',
766       'dependencies': [
767         '../base/base.gyp:base',
768         '../net/net.gyp:net_test_support',
769         '../testing/gtest.gyp:gtest',
770         'common/api/api.gyp:extensions_api',
771         'extensions_browser',
772         'extensions_common',
773         'extensions_resources.gyp:extensions_resources',
774       ],
775       'include_dirs': [
776         '..',
777         '<(SHARED_INTERMEDIATE_DIR)',
778       ],
779       'sources': [
780         'browser/api/dns/mock_host_resolver_creator.cc',
781         'browser/api/dns/mock_host_resolver_creator.h',
782         'browser/api_test_utils.cc',
783         'browser/api_test_utils.h',
784         'browser/extensions_test.cc',
785         'browser/extensions_test.h',
786         'browser/mock_extension_system.cc',
787         'browser/mock_extension_system.h',
788         'browser/test_extensions_browser_client.cc',
789         'browser/test_extensions_browser_client.h',
790         'browser/test_management_policy.cc',
791         'browser/test_management_policy.h',
792         'browser/test_runtime_api_delegate.cc',
793         'browser/test_runtime_api_delegate.h',
794         'common/extension_builder.cc',
795         'common/extension_builder.h',
796         'common/test_util.cc',
797         'common/test_util.h',
798         'common/value_builder.cc',
799         'common/value_builder.h',
800         'renderer/test_extensions_renderer_client.cc',
801         'renderer/test_extensions_renderer_client.h',
802         'test/test_extensions_client.cc',
803         'test/test_extensions_client.h',
804         'test/test_permission_message_provider.cc',
805         'test/test_permission_message_provider.h',
806         'test/test_permissions_provider.cc',
807         'test/test_permissions_provider.h',
808       ],
809       # Disable c4267 warnings until we fix size_t to int truncations.
810       'msvs_disabled_warnings': [ 4267, ],
811     },
812     {
813       # The pak file generated by this target is intended to be shared by
814       # both shell and test targets. It was combined because it might help a
815       # little bit with build time by avoiding a repack step (one instead of
816       # two).
817       'target_name': 'extensions_shell_and_test_pak',
818       'type': 'none',
819       'dependencies': [
820         # Need extension related resources in common_resources.pak and
821         # renderer_resources_100_percent.pak
822         '../chrome/chrome_resources.gyp:chrome_resources',
823         # Need dev-tools related resources in shell_resources.pak and
824         # devtools_resources.pak.
825         '../content/browser/devtools/devtools_resources.gyp:devtools_resources',
826         '../content/content_resources.gyp:content_resources',
827         '../content/content_shell_and_tests.gyp:content_shell_resources',
828         '../ui/resources/ui_resources.gyp:ui_resources',
829         '../ui/strings/ui_strings.gyp:ui_strings',
830         'extensions_resources.gyp:extensions_resources',
831         'extensions_strings.gyp:extensions_strings',
832         'shell/app_shell_resources.gyp:app_shell_resources',
833       ],
834       'actions': [
835         {
836           'action_name': 'repack_extensions_shell_and_test_pak',
837           'variables': {
838             'pak_inputs': [
839               '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.pak',
840               '<(SHARED_INTERMEDIATE_DIR)/chrome/extensions_api_resources.pak',
841               # TODO(jamescook): Extract the extension/app related resources
842               # from generated_resources_en-US.pak. http://crbug.com/397250
843               '<(SHARED_INTERMEDIATE_DIR)/chrome/generated_resources_en-US.pak',
844               '<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources_100_percent.pak',
845               '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
846               '<(SHARED_INTERMEDIATE_DIR)/content/shell_resources.pak',
847               '<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_renderer_resources.pak',
848               '<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_resources.pak',
849               '<(SHARED_INTERMEDIATE_DIR)/extensions/extensions_resources.pak',
850               '<(SHARED_INTERMEDIATE_DIR)/extensions/shell/app_shell_resources.pak',
851               '<(SHARED_INTERMEDIATE_DIR)/extensions/strings/extensions_strings_en-US.pak',
852               '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
853               '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
854               '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
855               '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
856             ],
857             'pak_output': '<(PRODUCT_DIR)/extensions_shell_and_test.pak',
858           },
859           'includes': [ '../build/repack_action.gypi' ],
860         },
861       ],
862     },
863     {
864       # TODO(tfarina): Many extension unit tests run as part of Chrome's
865       # unit_tests target. They should be moved here, which may require some
866       # refactoring (ExtensionsBrowserClient, TestingProfile, etc.).
867       # http://crbug.com/348066
868       'target_name': 'extensions_unittests',
869       'type': 'executable',
870       'dependencies': [
871         '../base/base.gyp:base',
872         '../base/base.gyp:test_support_base',
873         '../components/components.gyp:keyed_service_content',
874         '../content/content_shell_and_tests.gyp:test_support_content',
875         '../device/serial/serial.gyp:device_serial',
876         '../device/serial/serial.gyp:device_serial_test_util',
877         '../mojo/mojo_base.gyp:mojo_environment_chromium',
878         '../mojo/mojo_base.gyp:mojo_cpp_bindings',
879         '../mojo/mojo_base.gyp:mojo_js_bindings_lib',
880         '../mojo/mojo_base.gyp:mojo_system_impl',
881         '../testing/gmock.gyp:gmock',
882         '../testing/gtest.gyp:gtest',
883         '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
884         'extensions_common',
885         'extensions_renderer',
886         'extensions_resources.gyp:extensions_resources',
887         'extensions_shell_and_test_pak',
888         'extensions_strings.gyp:extensions_strings',
889         'extensions_test_support',
890       ],
891       # Needed for third_party libraries like leveldb.
892       'include_dirs': [
893         '..',
894       ],
895       'sources': [
896         'browser/admin_policy_unittest.cc',
897         'browser/api/api_resource_manager_unittest.cc',
898         'browser/computed_hashes_unittest.cc',
899         'browser/content_hash_tree_unittest.cc',
900         'browser/event_listener_map_unittest.cc',
901         'browser/event_router_unittest.cc',
902         'browser/extension_pref_value_map_unittest.cc',
903         'browser/extension_registry_unittest.cc',
904         'browser/file_highlighter_unittest.cc',
905         'browser/file_reader_unittest.cc',
906         'browser/guest_view/guest_view_manager_unittest.cc',
907         'browser/image_loader_unittest.cc',
908         'browser/image_util_unittest.cc',
909         'browser/info_map_unittest.cc',
910         'browser/lazy_background_task_queue_unittest.cc',
911         'browser/management_policy_unittest.cc',
912         'browser/process_manager_unittest.cc',
913         'browser/process_map_unittest.cc',
914         'browser/quota_service_unittest.cc',
915         'browser/runtime_data_unittest.cc',
916         'browser/value_store/leveldb_value_store_unittest.cc',
917         'browser/value_store/testing_value_store_unittest.cc',
918         'browser/value_store/value_store_change_unittest.cc',
919         'browser/value_store/value_store_frontend_unittest.cc',
920         'browser/value_store/value_store_unittest.cc',
921         'browser/value_store/value_store_unittest.h',
922         'browser/verified_contents_unittest.cc',
923         'common/api/sockets/sockets_manifest_permission_unittest.cc',
924         'common/csp_validator_unittest.cc',
925         'common/event_filter_unittest.cc',
926         'common/extension_resource_unittest.cc',
927         'common/extension_set_unittest.cc',
928         'common/manifest_handler_unittest.cc',
929         'common/message_bundle_unittest.cc',
930         'common/one_shot_event_unittest.cc',
931         'common/permissions/manifest_permission_set_unittest.cc',
932         'common/url_pattern_set_unittest.cc',
933         'common/url_pattern_unittest.cc',
934         'common/user_script_unittest.cc',
935         'renderer/activity_log_converter_strategy_unittest.cc',
936         'renderer/api/serial/data_receiver_unittest.cc',
937         'renderer/api/serial/data_sender_unittest.cc',
938         'renderer/api/serial/serial_api_unittest.cc',
939         'renderer/api_test_base.cc',
940         'renderer/api_test_base.h',
941         'renderer/api_test_base_unittest.cc',
942         'renderer/event_unittest.cc',
943         'renderer/json_schema_unittest.cc',
944         'renderer/messaging_utils_unittest.cc',
945         'renderer/module_system_test.cc',
946         'renderer/module_system_test.h',
947         'renderer/module_system_unittest.cc',
948         'renderer/safe_builtins_unittest.cc',
949         'renderer/script_context_set_unittest.cc',
950         'renderer/utils_unittest.cc',
951         'test/extensions_unittests_main.cc',
952       ],
953       # Disable c4267 warnings until we fix size_t to int truncations.
954       'msvs_disabled_warnings': [ 4267, ],
955       'conditions': [
956         ['OS=="win" and win_use_allocator_shim==1', {
957           'dependencies': [
958             '../base/allocator/allocator.gyp:allocator',
959           ],
960         }],
961       ],
962     },
963     {
964       # Protobuf compiler / generator for chrome.cast.channel-related protocol buffers.
965       # GN version: //extensions/browser/api/cast_channel:cast_channel_proto
966       'target_name': 'cast_channel_proto',
967       'type': 'static_library',
968       'sources': [
969           'browser/api/cast_channel/cast_channel.proto',
970           'browser/api/cast_channel/logging.proto'
971       ],
972       'variables': {
973           'proto_in_dir': 'browser/api/cast_channel',
974           'proto_out_dir': 'extensions/browser/api/cast_channel',
975       },
976       'includes': [ '../build/protoc.gypi' ]
977     },
978   ]