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