Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ios / web / ios_web.gyp
blobff79384af177f82ddb1c95e77c4b1bc3a6365f33
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.
6   'variables': {
7     'chromium_code': 1,
8    },
9   'targets': [
10     {
11       'target_name': 'ios_web_app',
12       'type': 'static_library',
13       'include_dirs': [
14         '../..',
15       ],
16       'dependencies': [
17         'ios_web',
18         'ios_web_thread',
19         '../../base/base.gyp:base',
20         '../../base/base.gyp:base_i18n',
21         '../../crypto/crypto.gyp:crypto',
22         '../../net/net.gyp:net',
23         '../../ui/base/ui_base.gyp:ui_base',
24         '../../ui/gfx/gfx.gyp:gfx',
25         '../../ui/gfx/gfx.gyp:gfx_geometry',
26       ],
27       'sources': [
28         'app/web_main.mm',
29         'app/web_main_loop.h',
30         'app/web_main_loop.mm',
31         'app/web_main_runner.h',
32         'app/web_main_runner.mm',
33         'public/app/web_main.h',
34         'public/app/web_main_delegate.h',
35         'public/app/web_main_parts.h',
36         'public/app/web_main_parts.mm',
37       ],
38     },
39     # Note: any embedder using ios_web will for now need to include either
40     # ios_web_thread (any new embedder) or ios_web_content_thread_shim (Chrome).
41     # This will become unnecessary once Chrome switches to using ios_web_thread,
42     # at which point that will be folded into this target.
43     {
44       'target_name': 'ios_web',
45       'type': 'static_library',
46       'include_dirs': [
47         '../..',
48       ],
49       'dependencies': [
50         'ios_web_core',
51         'js_resources',
52         'user_agent',
53         '../../base/base.gyp:base',
54         '../../components/url_formatter/url_formatter.gyp:url_formatter',
55         '../../content/content.gyp:content_browser',
56         '../../ios/net/ios_net.gyp:ios_net',
57         '../../ios/third_party/blink/blink_html_tokenizer.gyp:blink_html_tokenizer',
58         '../../net/net.gyp:net',
59         '../../ui/base/ui_base.gyp:ui_base',
60         '../../ui/gfx/gfx.gyp:gfx',
61         '../../ui/gfx/gfx.gyp:gfx_geometry',
62         '../../ui/resources/ui_resources.gyp:ui_resources',
63         '../../url/url.gyp:url_lib',
64       ],
65       'sources': [
66         '<(SHARED_INTERMEDIATE_DIR)/ui/resources/grit/webui_resources_map.cc',
67         'active_state_manager_impl.h',
68         'active_state_manager_impl.mm',
69         'alloc_with_zone_interceptor.h',
70         'alloc_with_zone_interceptor.mm',
71         'browser_state.mm',
72         'browser_url_rewriter_impl.cc',
73         'browser_url_rewriter_impl.h',
74         'browsing_data_managers/crw_browsing_data_manager.h',
75         'browsing_data_managers/crw_cookie_browsing_data_manager.h',
76         'browsing_data_managers/crw_cookie_browsing_data_manager.mm',
77         'browsing_data_partition_impl.h',
78         'browsing_data_partition_impl.mm',
79         'crw_browsing_data_store.mm',
80         'interstitials/html_web_interstitial_impl.h',
81         'interstitials/html_web_interstitial_impl.mm',
82         'interstitials/native_web_interstitial_impl.h',
83         'interstitials/native_web_interstitial_impl.mm',
84         'interstitials/web_interstitial_facade_delegate.h',
85         'interstitials/web_interstitial_impl.h',
86         'interstitials/web_interstitial_impl.mm',
87         'load_committed_details.cc',
88         'navigation/crw_session_certificate_policy_manager.h',
89         'navigation/crw_session_certificate_policy_manager.mm',
90         'navigation/crw_session_controller+private_constructors.h',
91         'navigation/crw_session_controller.h',
92         'navigation/crw_session_controller.mm',
93         'navigation/crw_session_entry.h',
94         'navigation/crw_session_entry.mm',
95         'navigation/navigation_item_facade_delegate.h',
96         'navigation/navigation_item_impl.h',
97         'navigation/navigation_item_impl.mm',
98         'navigation/navigation_manager_delegate.h',
99         'navigation/navigation_manager_facade_delegate.h',
100         'navigation/navigation_manager_impl.h',
101         'navigation/navigation_manager_impl.mm',
102         'navigation/nscoder_util.h',
103         'navigation/nscoder_util.mm',
104         'navigation/time_smoother.cc',
105         'navigation/time_smoother.h',
106         'navigation/web_load_params.h',
107         'navigation/web_load_params.mm',
108         'net/cert_policy.cc',
109         'net/cert_store_impl.cc',
110         'net/cert_store_impl.h',
111         'net/cert_verifier_block_adapter.cc',
112         'net/cert_verifier_block_adapter.h',
113         'net/certificate_policy_cache.cc',
114         'net/clients/crw_csp_network_client.h',
115         'net/clients/crw_csp_network_client.mm',
116         'net/clients/crw_js_injection_network_client.h',
117         'net/clients/crw_js_injection_network_client.mm',
118         'net/clients/crw_js_injection_network_client_factory.h',
119         'net/clients/crw_js_injection_network_client_factory.mm',
120         'net/clients/crw_passkit_delegate.h',
121         'net/clients/crw_passkit_network_client.h',
122         'net/clients/crw_passkit_network_client.mm',
123         'net/clients/crw_passkit_network_client_factory.h',
124         'net/clients/crw_passkit_network_client_factory.mm',
125         'net/clients/crw_redirect_network_client.h',
126         'net/clients/crw_redirect_network_client.mm',
127         'net/clients/crw_redirect_network_client_factory.h',
128         'net/clients/crw_redirect_network_client_factory.mm',
129         'net/cookie_notification_bridge.h',
130         'net/cookie_notification_bridge.mm',
131         'net/crw_cert_policy_cache.h',
132         'net/crw_cert_policy_cache.mm',
133         'net/crw_cert_verification_controller.h',
134         'net/crw_cert_verification_controller.mm',
135         'net/crw_request_tracker_delegate.h',
136         'net/crw_url_verifying_protocol_handler.h',
137         'net/crw_url_verifying_protocol_handler.mm',
138         'net/request_group_util.h',
139         'net/request_group_util.mm',
140         'net/request_tracker_data_memoizing_store.h',
141         'net/request_tracker_factory_impl.h',
142         'net/request_tracker_factory_impl.mm',
143         'net/request_tracker_impl.h',
144         'net/request_tracker_impl.mm',
145         'net/web_http_protocol_handler_delegate.h',
146         'net/web_http_protocol_handler_delegate.mm',
147         'public/active_state_manager.h',
148         'public/block_types.h',
149         'public/browser_state.h',
150         'public/browser_url_rewriter.h',
151         'public/browsing_data_partition.h',
152         'public/browsing_data_partition_client.cc',
153         'public/browsing_data_partition_client.h',
154         'public/cert_policy.h',
155         'public/cert_store.h',
156         'public/certificate_policy_cache.h',
157         'public/crw_browsing_data_store.h',
158         'public/crw_browsing_data_store_delegate.h',
159         'public/favicon_status.cc',
160         'public/favicon_status.h',
161         'public/favicon_url.cc',
162         'public/favicon_url.h',
163         'public/interstitials/web_interstitial.h',
164         'public/interstitials/web_interstitial_delegate.h',
165         'public/load_committed_details.h',
166         'public/navigation_item.h',
167         'public/navigation_manager.h',
168         'public/referrer.h',
169         'public/referrer_util.cc',
170         'public/referrer_util.h',
171         'public/security_style.h',
172         'public/ssl_status.cc',
173         'public/ssl_status.h',
174         'public/string_util.h',
175         'public/url_scheme_util.h',
176         'public/url_util.h',
177         'public/user_agent.h',
178         'public/user_agent.mm',
179         'public/user_metrics.h',
180         'public/web/url_data_source_ios.h',
181         'public/web_client.h',
182         'public/web_client.mm',
183         'public/web_controller_factory.h',
184         'public/web_controller_factory.mm',
185         'public/web_kit_constants.h',
186         'public/web_state/credential.h',
187         'public/web_state/crw_web_controller_observer.h',
188         'public/web_state/crw_web_user_interface_delegate.h',
189         'public/web_state/crw_web_view_proxy.h',
190         'public/web_state/crw_web_view_scroll_view_proxy.h',
191         'public/web_state/js/crw_js_injection_evaluator.h',
192         'public/web_state/js/crw_js_injection_manager.h',
193         'public/web_state/js/crw_js_injection_receiver.h',
194         'public/web_state/page_display_state.h',
195         'public/web_state/page_display_state.mm',
196         'public/web_state/ui/crw_content_view.h',
197         'public/web_state/ui/crw_generic_content_view.h',
198         'public/web_state/ui/crw_native_content.h',
199         'public/web_state/ui/crw_native_content_provider.h',
200         'public/web_state/ui/crw_web_delegate.h',
201         'public/web_state/ui/crw_web_view_content_view.h',
202         'public/web_state/url_verification_constants.h',
203         'public/web_state/web_state.h',
204         'public/web_state/web_state_observer.h',
205         'public/web_state/web_state_observer_bridge.h',
206         'public/web_state/web_state_policy_decider.h',
207         'public/web_state/web_state_user_data.h',
208         'public/web_thread.h',
209         'public/web_thread_delegate.h',
210         'public/web_ui_ios_data_source.h',
211         'public/web_view_counter.h',
212         'public/web_view_creation_util.h',
213         'public/web_view_type.h',
214         'string_util.cc',
215         'ui_web_view_util.h',
216         'ui_web_view_util.mm',
217         'url_scheme_util.mm',
218         'url_util.cc',
219         'user_metrics.cc',
220         'weak_nsobject_counter.h',
221         'weak_nsobject_counter.mm',
222         'web_kit_constants.cc',
223         'web_state/blocked_popup_info.h',
224         'web_state/blocked_popup_info.mm',
225         'web_state/credential.cc',
226         'web_state/crw_recurring_task_delegate.h',
227         'web_state/crw_web_view_proxy_impl.h',
228         'web_state/crw_web_view_proxy_impl.mm',
229         'web_state/crw_web_view_scroll_view_proxy.mm',
230         'web_state/error_translation_util.h',
231         'web_state/error_translation_util.mm',
232         'web_state/frame_info.h',
233         'web_state/js/credential_util.h',
234         'web_state/js/credential_util.mm',
235         'web_state/js/crw_js_early_script_manager.h',
236         'web_state/js/crw_js_early_script_manager.mm',
237         'web_state/js/crw_js_injection_manager.mm',
238         'web_state/js/crw_js_injection_receiver.mm',
239         'web_state/js/crw_js_invoke_parameter_queue.h',
240         'web_state/js/crw_js_invoke_parameter_queue.mm',
241         'web_state/js/crw_js_plugin_placeholder_manager.h',
242         'web_state/js/crw_js_plugin_placeholder_manager.mm',
243         'web_state/js/crw_js_window_id_manager.h',
244         'web_state/js/crw_js_window_id_manager.mm',
245         'web_state/js/page_script_util.h',
246         'web_state/js/page_script_util.mm',
247         'web_state/ui/crw_context_menu_provider.h',
248         'web_state/ui/crw_context_menu_provider.mm',
249         'web_state/ui/crw_debug_web_view.h',
250         'web_state/ui/crw_debug_web_view.mm',
251         'web_state/ui/crw_generic_content_view.mm',
252         'web_state/ui/crw_simple_web_view_controller.h',
253         'web_state/ui/crw_static_file_web_view.h',
254         'web_state/ui/crw_static_file_web_view.mm',
255         'web_state/ui/crw_swipe_recognizer_provider.h',
256         'web_state/ui/crw_touch_tracking_recognizer.h',
257         'web_state/ui/crw_touch_tracking_recognizer.mm',
258         'web_state/ui/crw_ui_simple_web_view_controller.h',
259         'web_state/ui/crw_ui_simple_web_view_controller.mm',
260         'web_state/ui/crw_ui_web_view_web_controller.h',
261         'web_state/ui/crw_ui_web_view_web_controller.mm',
262         'web_state/ui/crw_web_controller+protected.h',
263         'web_state/ui/crw_web_controller.h',
264         'web_state/ui/crw_web_controller.mm',
265         'web_state/ui/crw_web_controller_container_view.h',
266         'web_state/ui/crw_web_controller_container_view.mm',
267         'web_state/ui/crw_web_view_content_view.mm',
268         'web_state/ui/crw_wk_simple_web_view_controller.h',
269         'web_state/ui/crw_wk_simple_web_view_controller.mm',
270         'web_state/ui/crw_wk_web_view_crash_detector.h',
271         'web_state/ui/crw_wk_web_view_crash_detector.mm',
272         'web_state/ui/crw_wk_web_view_web_controller.h',
273         'web_state/ui/crw_wk_web_view_web_controller.mm',
274         'web_state/ui/web_view_js_utils.h',
275         'web_state/ui/web_view_js_utils.mm',
276         'web_state/ui/wk_back_forward_list_item_holder.h',
277         'web_state/ui/wk_back_forward_list_item_holder.mm',
278         'web_state/ui/wk_web_view_configuration_provider.h',
279         'web_state/ui/wk_web_view_configuration_provider.mm',
280         'web_state/web_controller_observer_bridge.h',
281         'web_state/web_controller_observer_bridge.mm',
282         'web_state/web_state.cc',
283         'web_state/web_state_facade_delegate.h',
284         'web_state/web_state_impl.h',
285         'web_state/web_state_impl.mm',
286         'web_state/web_state_observer.cc',
287         'web_state/web_state_observer_bridge.mm',
288         'web_state/web_state_policy_decider.mm',
289         'web_state/web_view_internal_creation_util.h',
290         'web_state/web_view_internal_creation_util.mm',
291         'web_state/wk_web_view_security_util.h',
292         'web_state/wk_web_view_security_util.mm',
293         'web_view_counter_impl.h',
294         'web_view_counter_impl.mm',
295         'web_view_creation_util.mm',
296         'webui/crw_web_ui_manager.h',
297         'webui/crw_web_ui_manager.mm',
298         'webui/crw_web_ui_page_builder.h',
299         'webui/crw_web_ui_page_builder.mm',
300         'webui/shared_resources_data_source_ios.cc',
301         'webui/shared_resources_data_source_ios.h',
302         'webui/url_data_manager_ios.cc',
303         'webui/url_data_manager_ios.h',
304         'webui/url_data_manager_ios_backend.cc',
305         'webui/url_data_manager_ios_backend.h',
306         'webui/url_data_source_ios.cc',
307         'webui/url_data_source_ios_impl.cc',
308         'webui/url_data_source_ios_impl.h',
309         'webui/url_fetcher_block_adapter.h',
310         'webui/url_fetcher_block_adapter.mm',
311         'webui/web_ui_ios_controller_factory_registry.cc',
312         'webui/web_ui_ios_controller_factory_registry.h',
313         'webui/web_ui_ios_data_source_impl.cc',
314         'webui/web_ui_ios_data_source_impl.h',
315         'webui/web_ui_ios_impl.h',
316         'webui/web_ui_ios_impl.mm',
317       ],
318       'link_settings': {
319         'xcode_settings': {
320           'OTHER_LDFLAGS': [
321             '-weak_framework WebKit',
322           ]
323         },
324       },
325     },
326     # Target that builds the actual WebThread implementation. This is a
327     # separate target since it can't yet be used by Chrome (see comment below).
328     {
329       'target_name': 'ios_web_thread',
330       'type': 'static_library',
331       'dependencies': [
332         '../../base/base.gyp:base',
333         '../../net/net.gyp:net',
334       ],
335       'include_dirs': [
336         '../..',
337       ],
338       'sources': [
339         'web_thread_impl.cc',
340         'web_thread_impl.h',
341       ],
342     },
343     # Target that builds the files that shim WebThread functions to their
344     # corresponding content equivalents. This is a separate target since it
345     # is needed by Chrome, which still uses content startup (which creates
346     # content threads), but isn't used by web_shell.
347     {
348       'target_name': 'ios_web_content_thread_shim',
349       'type': 'static_library',
350       'dependencies': [
351         '../../base/base.gyp:base',
352         '../../content/content.gyp:content_browser',
353       ],
354       'include_dirs': [
355         '../..',
356       ],
357       'sources': [
358         'web_thread_adapter.cc',
359         'web_thread_adapter.h',
360       ],
361     },
362     # Target shared by ios_web and CrNet.
363     {
364       'target_name': 'ios_web_core',
365       'type': 'static_library',
366       'dependencies': [
367         '../../base/base.gyp:base',
368       ],
369       'include_dirs': [
370         '../..',
371       ],
372       'sources': [
373         'crw_network_activity_indicator_manager.h',
374         'crw_network_activity_indicator_manager.mm',
375         'history_state_util.h',
376         'history_state_util.mm',
377       ],
378     },
379     {
380       'target_name': 'ios_web_js_bundle_ui',
381       'type': 'none',
382       'variables': {
383         'closure_entry_point': '__crWeb.webBundle',
384         'js_bundle_files': [
385           'web_state/js/resources/base.js',
386           'web_state/js/resources/common.js',
387           'web_state/js/resources/console.js',
388           'web_state/js/resources/core.js',
389           'web_state/js/resources/core_dynamic_ui.js',
390           'web_state/js/resources/dialog_overrides.js',
391           'web_state/js/resources/message.js',
392           'web_state/js/resources/message_dynamic_ui.js',
393           'web_state/js/resources/web_bundle_ui.js',
394           'web_state/js/resources/window_open_ui.js',
395         ],
396       },
397       'sources': [
398         'web_state/js/resources/web_bundle_ui.js',
399       ],
400       'link_settings': {
401         'mac_bundle_resources': [
402           '<(SHARED_INTERMEDIATE_DIR)/web_bundle_ui.js',
403         ],
404       },
405       'includes': [
406         'js_compile_bundle.gypi'
407       ],
408     },
409     {
410       'target_name': 'ios_web_js_bundle_wk',
411       'type': 'none',
412       'variables': {
413         'closure_entry_point': '__crWeb.webBundle',
414         'js_bundle_files': [
415           'web_state/js/resources/base.js',
416           'web_state/js/resources/common.js',
417           'web_state/js/resources/console.js',
418           'web_state/js/resources/core.js',
419           'web_state/js/resources/core_dynamic_wk.js',
420           'web_state/js/resources/dialog_overrides.js',
421           'web_state/js/resources/message.js',
422           'web_state/js/resources/message_dynamic_wk.js',
423           'web_state/js/resources/web_bundle_wk.js',
424           'web_state/js/resources/window_open_wk.js',
425         ],
426       },
427       'sources': [
428         'web_state/js/resources/web_bundle_wk.js',
429       ],
430       'link_settings': {
431         'mac_bundle_resources': [
432           '<(SHARED_INTERMEDIATE_DIR)/web_bundle_wk.js',
433         ],
434       },
435       'includes': [
436         'js_compile_bundle.gypi'
437       ],
438     },
439     {
440       'target_name': 'js_resources',
441       'type': 'none',
442       'dependencies': [
443         'ios_web_js_bundle_ui',
444         'ios_web_js_bundle_wk',
445       ],
446       'sources': [
447         'web_state/js/resources/plugin_placeholder.js',
448         'web_state/js/resources/window_id.js',
449         'webui/resources/web_ui.js',
450       ],
451       'link_settings': {
452         'mac_bundle_resources': [
453           '<(SHARED_INTERMEDIATE_DIR)/plugin_placeholder.js',
454           '<(SHARED_INTERMEDIATE_DIR)/window_id.js',
455           '<(SHARED_INTERMEDIATE_DIR)/web_ui.js',
456         ],
457       },
458       'includes': [
459         'js_compile_checked.gypi'
460       ],
461     },
462     {
463       'target_name': 'test_support_ios_web',
464       'type': 'static_library',
465       'dependencies': [
466         'ios_web_thread',
467         'test_support_ios_web_without_threads',
468       ],
469       'include_dirs': [
470         '../..',
471       ],
472       'sources': [
473         'test/test_web_thread.cc',
474         'test/test_web_thread_bundle.cc',
475       ],
476     },
477     {
478       'target_name': 'test_support_ios_web_with_content_thread_shim',
479       'type': 'static_library',
480       'dependencies': [
481         'ios_web_content_thread_shim',
482         'test_support_ios_web_without_threads',
483       ],
484       'include_dirs': [
485         '../..',
486       ],
487       'sources': [
488         'test/test_web_thread_adapter.cc',
489         'test/test_web_thread_bundle_adapter.cc',
490       ],
491     },
492     # A test support target that does not include TestWebThread. This is
493     # separate because tests that rely on the the shim thread implementation
494     # can't use TestWebThread/TestWebThreadBundle.
495     # TODO(stuartmorgan): Fold this into test_support_ios_web once
496     # the WebThread-to-BrowserThread shim is gone.
497     {
498       'target_name': 'test_support_ios_web_without_threads',
499       'type': 'static_library',
500       'dependencies': [
501         'ios_web',
502         '../../content/content_shell_and_tests.gyp:test_support_content',
503         '../../ios/testing/ios_testing.gyp:ocmock_support',
504         '../../ios/third_party/gcdwebserver/gcdwebserver.gyp:gcdwebserver',
505         '../../testing/gmock.gyp:gmock',
506         '../../testing/gtest.gyp:gtest',
507         '../../third_party/ocmock/ocmock.gyp:ocmock',
508       ],
509       'include_dirs': [
510         '../..',
511       ],
512       'sources': [
513         'public/test/crw_test_js_injection_receiver.h',
514         'public/test/crw_test_js_injection_receiver.mm',
515         'public/test/http_server.h',
516         'public/test/http_server.mm',
517         'public/test/js_test_util.h',
518         'public/test/js_test_util.mm',
519         'public/test/response_providers/data_response_provider.h',
520         'public/test/response_providers/data_response_provider.mm',
521         'public/test/response_providers/file_based_response_provider.h',
522         'public/test/response_providers/file_based_response_provider.mm',
523         'public/test/response_providers/file_based_response_provider_impl.cc',
524         'public/test/response_providers/file_based_response_provider_impl.h',
525         'public/test/response_providers/response_provider.cc',
526         'public/test/response_providers/response_provider.h',
527         'public/test/test_browser_state.cc',
528         'public/test/test_browser_state.h',
529         'public/test/test_web_client.h',
530         'public/test/test_web_client.mm',
531         'public/test/test_web_state.cc',
532         'public/test/test_web_state.h',
533         'public/test/test_web_thread.h',
534         'public/test/test_web_thread_bundle.h',
535         'public/test/test_web_view_content_view.h',
536         'public/test/test_web_view_content_view.mm',
537         'public/test/web_test_util.h',
538         'test/crw_fake_web_controller_observer.h',
539         'test/crw_fake_web_controller_observer.mm',
540         'test/web_test.h',
541         'test/web_test.mm',
542         'test/web_test_suite.cc',
543         'test/web_test_suite.h',
544         'test/wk_web_view_crash_utils.h',
545         'test/wk_web_view_crash_utils.mm',
546       ],
547     },
548     {
549       'target_name': 'user_agent',
550       'type': 'static_library',
551       'include_dirs': [
552         '../..',
553       ],
554       'dependencies': [
555         '../../base/base.gyp:base'
556       ],
557       'sources': [
558         'public/user_agent.h',
559         'public/user_agent.mm',
560       ],
561     },
562   ],