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