[iOS] Load packed resources when running ios_chrome_unittests
[chromium-blink-merge.git] / android_webview / android_webview.gyp
blobbbd23c6116e787fe21bc540af99874a4a4c4278b
1 # Copyright 2009 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5   'variables': {
6     'chromium_code': 1,
7   },
8   'targets': [
9     {
10       'target_name': 'android_webview_pak',
11       'type': 'none',
12       'dependencies': [
13         '<(DEPTH)/content/app/resources/content_resources.gyp:content_resources',
14         '<(DEPTH)/net/net.gyp:net_resources',
15         '<(DEPTH)/third_party/WebKit/public/blink_resources.gyp:blink_resources',
16         '<(DEPTH)/ui/resources/ui_resources.gyp:ui_resources',
17       ],
18       'actions': [
19         {
20           'action_name': 'repack_android_webview_pack',
21           'variables': {
22             'pak_inputs': [
23               '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
24               '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
25               '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
26               '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
27               '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
28               '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
29             ],
30             'pak_output': '<(PRODUCT_DIR)/android_webview_assets/webviewchromium.pak',
31           },
32          'includes': [ '../build/repack_action.gypi' ],
33         },
34         {
35           'action_name': 'android_webview_locales_rename_paks',
36           'variables': {
37             'rename_locales': 'tools/webview_locales_rename_paks.py',
38           },
39           'inputs': [
40             '<(rename_locales)',
41             '<!@pymod_do_main(webview_locales_rename_paks -i -p <(PRODUCT_DIR) -s <(SHARED_INTERMEDIATE_DIR) <(locales))'
42           ],
43           'outputs': [
44             '<!@pymod_do_main(webview_locales_rename_paks -o -p <(PRODUCT_DIR) -s <(SHARED_INTERMEDIATE_DIR) <(locales))'
45           ],
46           'action': [
47             'python',
48             '<(rename_locales)',
49             '-p', '<(PRODUCT_DIR)',
50             '-s', '<(SHARED_INTERMEDIATE_DIR)',
51             '<@(locales)',
52           ],
53         },
54       ],
55       'conditions': [
56         ['v8_use_external_startup_data==1', {
57           'variables': {
58             'conditions': [
59               ['(target_arch=="arm" or target_arch=="ia32" or target_arch=="mipsel")', {
60                 'arch_suffix':'32'
61               }],
62               ['(target_arch=="arm64" or target_arch=="x64" or target_arch=="mips64el")', {
63                 'arch_suffix':'64'
64               }],
65             ],
66           },
67           'actions': [
68             {
69               'action_name': 'rename_snapshot_blob',
70               'inputs': [
71                 '<(PRODUCT_DIR)/snapshot_blob.bin',
72               ],
73               'outputs': [
74                 '<(PRODUCT_DIR)/snapshot_blob_<(arch_suffix).bin',
75               ],
76               'action': [
77                 'python',
78                 '<(DEPTH)/build/cp.py',
79                 '<@(_inputs)',
80                 '<@(_outputs)',
81               ],
82             },
83             {
84               'action_name': 'rename_natives_blob',
85               'inputs': [
86                 '<(PRODUCT_DIR)/natives_blob.bin',
87               ],
88               'outputs': [
89                 '<(PRODUCT_DIR)/natives_blob_<(arch_suffix).bin',
90               ],
91               'action': [
92                 'python',
93                 '<(DEPTH)/build/cp.py',
94                 '<@(_inputs)',
95                 '<@(_outputs)',
96               ],
97             },
98           ],
99         }],
100       ],
101     },
102     {
103       'target_name': 'android_webview_strings_grd',
104       'android_unmangled_name': 1,
105       'type': 'none',
106       'variables': {
107         'grd_file': '../android_webview/java/strings/android_webview_strings.grd',
108       },
109       'includes': [
110           '../build/java_strings_grd.gypi',
111       ],
112     },
113     {
114       'target_name': 'android_webview_version',
115       'type': 'none',
116       'direct_dependent_settings': {
117         'include_dirs': [
118           '<(SHARED_INTERMEDIATE_DIR)',
119         ],
120       },
121       # Because generate_version generates a header, we must set the
122       # hard_dependency flag.
123       'hard_dependency': 1,
124       'actions': [
125         {
126           'action_name': 'generate_version',
127           'includes': [
128             '../build/util/version.gypi',
129           ],
130           'variables': {
131             'template_input_path': 'common/aw_version_info_values.h.version',
132           },
133           'inputs': [
134             '<(version_py_path)',
135             '<(template_input_path)',
136             '<(version_path)',
137             '<(lastchange_path)',
138           ],
139           'outputs': [
140             '<(SHARED_INTERMEDIATE_DIR)/android_webview/common/aw_version_info_values.h',
141           ],
142           'action': [
143             'python',
144             '<(version_py_path)',
145             '-f', '<(version_path)',
146             '-f', '<(lastchange_path)',
147             '<(template_input_path)',
148             '<@(_outputs)',
149           ],
150           'message': 'Generating version information',
151         },
152       ],
153     },
154     {
155       'target_name': 'android_webview_common',
156       'type': 'static_library',
157       'dependencies': [
158         '../android_webview/native/webview_native.gyp:webview_native',
159         '../cc/cc.gyp:cc_surfaces',
160         '../components/components.gyp:auto_login_parser',
161         '../components/components.gyp:autofill_content_renderer',
162         '../components/components.gyp:breakpad_host',
163         '../components/components.gyp:cdm_browser',
164         '../components/components.gyp:cdm_renderer',
165         '../components/components.gyp:crash_component',
166         '../components/components.gyp:data_reduction_proxy_core_browser',
167         '../components/components.gyp:devtools_discovery',
168         '../components/components.gyp:navigation_interception',
169         '../components/components.gyp:printing_common',
170         '../components/components.gyp:printing_renderer',
171         '../components/components.gyp:visitedlink_browser',
172         '../components/components.gyp:visitedlink_renderer',
173         '../components/components.gyp:web_contents_delegate_android',
174         '../content/content.gyp:content_app_both',
175         '../content/content.gyp:content_browser',
176         '../gin/gin.gyp:gin',
177         '../gpu/blink/gpu_blink.gyp:gpu_blink',
178         '../gpu/command_buffer/command_buffer.gyp:gles2_utils',
179         '../gpu/gpu.gyp:command_buffer_service',
180         '../gpu/gpu.gyp:gl_in_process_context',
181         '../gpu/gpu.gyp:gles2_c_lib',
182         '../gpu/gpu.gyp:gles2_implementation',
183         '../gpu/skia_bindings/skia_bindings.gyp:gpu_skia_bindings',
184         '../media/media.gyp:media',
185         '../media/midi/midi.gyp:midi',
186         '../printing/printing.gyp:printing',
187         '../skia/skia.gyp:skia',
188         '../third_party/WebKit/public/blink.gyp:blink',
189         '../ui/gl/gl.gyp:gl',
190         '../ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs',
191         '../v8/tools/gyp/v8.gyp:v8',
192         'android_webview_pak',
193         'android_webview_version',
194       ],
195       'include_dirs': [
196         '..',
197         '../skia/config',
198         '<(SHARED_INTERMEDIATE_DIR)/ui/resources/',
199       ],
200       'sources': [
201         'browser/aw_browser_context.cc',
202         'browser/aw_browser_context.h',
203         'browser/aw_browser_main_parts.cc',
204         'browser/aw_browser_main_parts.h',
205         'browser/aw_browser_permission_request_delegate.h',
206         'browser/aw_contents_client_bridge_base.cc',
207         'browser/aw_contents_client_bridge_base.h',
208         'browser/aw_content_browser_client.cc',
209         'browser/aw_content_browser_client.h',
210         'browser/aw_contents_io_thread_client.h',
211         'browser/aw_cookie_access_policy.cc',
212         'browser/aw_cookie_access_policy.h',
213         'browser/aw_dev_tools_discovery_provider.cc',
214         'browser/aw_dev_tools_discovery_provider.h',
215         'browser/aw_download_manager_delegate.cc',
216         'browser/aw_download_manager_delegate.h',
217         'browser/aw_form_database_service.cc',
218         'browser/aw_form_database_service.h',
219         'browser/aw_gl_surface.cc',
220         'browser/aw_gl_surface.h',
221         'browser/aw_http_auth_handler_base.cc',
222         'browser/aw_http_auth_handler_base.h',
223         'browser/aw_javascript_dialog_manager.cc',
224         'browser/aw_javascript_dialog_manager.h',
225         'browser/aw_login_delegate.cc',
226         'browser/aw_login_delegate.h',
227         'browser/aw_media_client_android.cc',
228         'browser/aw_media_client_android.h',
229         'browser/aw_message_port_message_filter.cc',
230         'browser/aw_message_port_message_filter.h',
231         'browser/aw_message_port_service.h',
232         'browser/aw_permission_manager.cc',
233         'browser/aw_permission_manager.h',
234         'browser/aw_pref_store.cc',
235         'browser/aw_pref_store.h',
236         'browser/aw_printing_message_filter.cc',
237         'browser/aw_printing_message_filter.h',
238         'browser/aw_quota_manager_bridge.cc',
239         'browser/aw_quota_manager_bridge.h',
240         'browser/aw_quota_permission_context.cc',
241         'browser/aw_quota_permission_context.h',
242         'browser/aw_render_thread_context_provider.cc',
243         'browser/aw_render_thread_context_provider.h',
244         'browser/aw_request_interceptor.cc',
245         'browser/aw_request_interceptor.h',
246         'browser/aw_resource_context.cc',
247         'browser/aw_resource_context.h',
248         'browser/aw_ssl_host_state_delegate.cc',
249         'browser/aw_ssl_host_state_delegate.h',
250         'browser/aw_result_codes.h',
251         'browser/aw_web_preferences_populater.cc',
252         'browser/aw_web_preferences_populater.h',
253         'browser/aw_web_resource_response.cc',
254         'browser/aw_web_resource_response.h',
255         'browser/browser_view_renderer.cc',
256         'browser/browser_view_renderer.h',
257         'browser/browser_view_renderer_client.h',
258         'browser/child_frame.cc',
259         'browser/child_frame.h',
260         'browser/deferred_gpu_command_service.cc',
261         'browser/deferred_gpu_command_service.h',
262         'browser/find_helper.cc',
263         'browser/find_helper.h',
264         'browser/hardware_renderer.cc',
265         'browser/hardware_renderer.h',
266         'browser/icon_helper.cc',
267         'browser/icon_helper.h',
268         'browser/input_stream.h',
269         'browser/jni_dependency_factory.h',
270         'browser/gl_view_renderer_manager.cc',
271         'browser/gl_view_renderer_manager.h',
272         'browser/net/android_stream_reader_url_request_job.cc',
273         'browser/net/android_stream_reader_url_request_job.h',
274         'browser/net/aw_network_delegate.cc',
275         'browser/net/aw_network_delegate.h',
276         'browser/net/aw_url_request_context_getter.cc',
277         'browser/net/aw_url_request_context_getter.h',
278         'browser/net/aw_url_request_job_factory.cc',
279         'browser/net/aw_url_request_job_factory.h',
280         'browser/net_disk_cache_remover.cc',
281         'browser/net_disk_cache_remover.h',
282         'browser/net/init_native_callback.h',
283         'browser/net/input_stream_reader.cc',
284         'browser/net/input_stream_reader.h',
285         'browser/parent_compositor_draw_constraints.cc',
286         'browser/parent_compositor_draw_constraints.h',
287         'browser/parent_output_surface.cc',
288         'browser/parent_output_surface.h',
289         'browser/renderer_host/aw_render_view_host_ext.cc',
290         'browser/renderer_host/aw_render_view_host_ext.h',
291         'browser/renderer_host/aw_resource_dispatcher_host_delegate.cc',
292         'browser/renderer_host/aw_resource_dispatcher_host_delegate.h',
293         'browser/renderer_host/print_manager.cc',
294         'browser/renderer_host/print_manager.h',
295         'browser/scoped_allow_wait_for_legacy_web_view_api.h',
296         'browser/scoped_app_gl_state_restore.cc',
297         'browser/scoped_app_gl_state_restore.h',
298         'browser/shared_renderer_state.cc',
299         'browser/shared_renderer_state.h',
300         'common/android_webview_message_generator.cc',
301         'common/android_webview_message_generator.h',
302         'common/aw_content_client.cc',
303         'common/aw_content_client.h',
304         'common/aw_hit_test_data.cc',
305         'common/aw_hit_test_data.h',
306         'common/aw_message_port_messages.h',
307         'common/aw_resource.h',
308         'common/aw_switches.cc',
309         'common/aw_switches.h',
310         'common/devtools_instrumentation.h',
311         'common/render_view_messages.cc',
312         'common/render_view_messages.h',
313         'common/url_constants.cc',
314         'common/url_constants.h',
315         'crash_reporter/aw_microdump_crash_reporter.cc',
316         'crash_reporter/aw_microdump_crash_reporter.h',
317         'lib/aw_browser_dependency_factory_impl.cc',
318         'lib/aw_browser_dependency_factory_impl.h',
319         'lib/main/aw_main_delegate.cc',
320         'lib/main/aw_main_delegate.h',
321         'lib/main/webview_jni_onload.cc',
322         'lib/main/webview_jni_onload.h',
323         'public/browser/draw_gl.h',
324         'renderer/aw_content_renderer_client.cc',
325         'renderer/aw_content_renderer_client.h',
326         'renderer/aw_content_settings_client.cc',
327         'renderer/aw_content_settings_client.h',
328         'renderer/aw_key_systems.cc',
329         'renderer/aw_key_systems.h',
330         'renderer/aw_message_port_client.cc',
331         'renderer/aw_message_port_client.h',
332         'renderer/aw_print_web_view_helper_delegate.cc',
333         'renderer/aw_print_web_view_helper_delegate.h',
334         'renderer/aw_render_process_observer.cc',
335         'renderer/aw_render_process_observer.h',
336         'renderer/aw_render_frame_ext.cc',
337         'renderer/aw_render_frame_ext.h',
338         'renderer/aw_render_view_ext.cc',
339         'renderer/aw_render_view_ext.h',
340         'renderer/print_render_frame_observer.cc',
341         'renderer/print_render_frame_observer.h',
342       ],
343     },
344     {
345       'target_name': 'libwebviewchromium',
346       'includes': [
347           'libwebviewchromium.gypi',
348       ],
349     },
350     {
351       'target_name': 'android_webview_java',
352       'type': 'none',
353       'dependencies': [
354         '../components/components.gyp:external_video_surface_java',
355         '../components/components.gyp:navigation_interception_java',
356         '../components/components.gyp:web_contents_delegate_android_java',
357         '../content/content.gyp:content_java',
358         '../ui/android/ui_android.gyp:ui_java',
359         'android_webview_strings_grd',
360       ],
361       'variables': {
362         'java_in_dir': '../android_webview/java',
363         'has_java_resources': 1,
364         'R_package': 'org.chromium.android_webview',
365         'R_package_relpath': 'org/chromium/android_webview',
366       },
367       'includes': [ '../build/java.gypi' ],
368     },
369     {
370       'target_name': 'system_webview_apk',
371       'variables': {
372         'apk_name': 'SystemWebView',
373         'android_sdk_jar': '../third_party/android_platform/webview/frameworks_5.1.0_r1.jar',
374         'java_in_dir': 'glue/java',
375         'resource_dir': 'apk/java/res',
376       },
377       'includes': [ 'apk/system_webview_apk_common.gypi' ],
378     },
379   ],
380   'includes': [
381     'android_webview_tests.gypi',
382   ],