Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / android_webview / android_webview.gyp
blobe2b6b6f8a2a01a163bd888b12bbf2126a225d0e8
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   'includes': [
9     'android_webview_tests.gypi',
10   ],
11   'targets': [
12     {
13       'target_name': 'libwebviewchromium',
14       'type': 'shared_library',
15       'android_unmangled_name': 1,
16       'dependencies': [
17         'android_webview_common',
18       ],
19       'ldflags': [
20         # fix linking to hidden symbols and re-enable this (crbug.com/157326)
21         '-Wl,--no-fatal-warnings'
22       ],
23       'sources': [
24         'lib/main/webview_entry_point.cc',
25       ],
26       'conditions': [
27         ['android_webview_build == 1', {
28           'libraries': [
29             # The "android" gyp backend doesn't quite handle static libraries'
30             # dependencies correctly; force this to be linked as a workaround.
31             'cpufeatures.a',
32             '-lcutils',
33           ],
34         }],
35       ],
36     },
37     {
38       'target_name': 'android_webview_pak',
39       'type': 'none',
40       'dependencies': [
41         '<(DEPTH)/content/browser/devtools/devtools_resources.gyp:devtools_resources',
42         '<(DEPTH)/content/content_resources.gyp:content_resources',
43         '<(DEPTH)/net/net.gyp:net_resources',
44         '<(DEPTH)/ui/ui.gyp:ui_resources',
45         '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
46       ],
47       'variables': {
48         'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
49       },
50       'actions': [
51         {
52           'action_name': 'repack_android_webview_pack',
53           'variables': {
54             'pak_inputs': [
55               '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
56               '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
57               '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
58               '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
59               '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
60               '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
61             ],
62           },
63           'inputs': [
64             '<(repack_path)',
65             '<@(pak_inputs)',
66           ],
67           'outputs': [
68             '<(PRODUCT_DIR)/android_webview_apk/assets/webviewchromium.pak',
69           ],
70           'action': ['python', '<(repack_path)', '<@(_outputs)',
71                      '<@(pak_inputs)'],
72         }
73       ],
74     },
75     {
76       'target_name': 'android_webview_common',
77       'type': 'static_library',
78       'dependencies': [
79         '../android_webview/native/webview_native.gyp:webview_native',
80         '../components/components.gyp:auto_login_parser',
81         '../components/components.gyp:navigation_interception',
82         '../components/components.gyp:visitedlink_browser',
83         '../components/components.gyp:visitedlink_renderer',
84         '../components/components.gyp:web_contents_delegate_android',
85         '../content/content.gyp:content',
86         '../skia/skia.gyp:skia',
87         '../ui/gl/gl.gyp:gl',
88         'android_webview_pak',
89       ],
90       'include_dirs': [
91         '..',
92         '../skia/config',
93         '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/',
94       ],
95       'sources': [
96         'browser/aw_browser_context.cc',
97         'browser/aw_browser_context.h',
98         'browser/aw_browser_main_parts.cc',
99         'browser/aw_browser_main_parts.h',
100         'browser/aw_contents_client_bridge_base.cc',
101         'browser/aw_contents_client_bridge_base.h',
102         'browser/aw_content_browser_client.cc',
103         'browser/aw_content_browser_client.h',
104         'browser/aw_contents_io_thread_client.h',
105         'browser/aw_cookie_access_policy.cc',
106         'browser/aw_cookie_access_policy.h',
107         'browser/aw_devtools_delegate.cc',
108         'browser/aw_devtools_delegate.h',
109         'browser/aw_download_manager_delegate.cc',
110         'browser/aw_download_manager_delegate.h',
111         'browser/aw_http_auth_handler_base.cc',
112         'browser/aw_http_auth_handler_base.h',
113         'browser/aw_javascript_dialog_manager.cc',
114         'browser/aw_javascript_dialog_manager.h',
115         'browser/aw_login_delegate.cc',
116         'browser/aw_login_delegate.h',
117         'browser/aw_quota_manager_bridge.cc',
118         'browser/aw_quota_manager_bridge.h',
119         'browser/aw_quota_permission_context.cc',
120         'browser/aw_quota_permission_context.h',
121         'browser/aw_request_interceptor.cc',
122         'browser/aw_request_interceptor.h',
123         'browser/aw_result_codes.h',
124         'browser/browser_view_renderer.h',
125         'browser/browser_view_renderer_impl.cc',
126         'browser/browser_view_renderer_impl.h',
127         'browser/find_helper.cc',
128         'browser/find_helper.h',
129         'browser/gpu_memory_buffer_factory_impl.cc',
130         'browser/gpu_memory_buffer_factory_impl.h',
131         'browser/gpu_memory_buffer_impl.cc',
132         'browser/gpu_memory_buffer_impl.h',
133         'browser/icon_helper.cc',
134         'browser/icon_helper.h',
135         'browser/input_stream.h',
136         'browser/intercepted_request_data.h',
137         'browser/jni_dependency_factory.h',
138         'browser/net/android_stream_reader_url_request_job.cc',
139         'browser/net/android_stream_reader_url_request_job.h',
140         'browser/net/aw_network_delegate.cc',
141         'browser/net/aw_network_delegate.h',
142         'browser/net/aw_url_request_context_getter.cc',
143         'browser/net/aw_url_request_context_getter.h',
144         'browser/net/aw_url_request_job_factory.cc',
145         'browser/net/aw_url_request_job_factory.h',
146         'browser/net_disk_cache_remover.cc',
147         'browser/net_disk_cache_remover.h',
148         'browser/net/init_native_callback.h',
149         'browser/net/input_stream_reader.cc',
150         'browser/net/input_stream_reader.h',
151         'browser/renderer_host/aw_render_view_host_ext.cc',
152         'browser/renderer_host/aw_render_view_host_ext.h',
153         'browser/renderer_host/aw_resource_dispatcher_host_delegate.cc',
154         'browser/renderer_host/aw_resource_dispatcher_host_delegate.h',
155         'browser/renderer_host/view_renderer_host.cc',
156         'browser/renderer_host/view_renderer_host.h',
157         'browser/scoped_allow_wait_for_legacy_web_view_api.h',
158         'browser/scoped_allow_wait_for_legacy_web_view_api.h',
159         'common/android_webview_message_generator.cc',
160         'common/android_webview_message_generator.h',
161         'common/aw_content_client.cc',
162         'common/aw_content_client.h',
163         'common/aw_hit_test_data.cc',
164         'common/aw_hit_test_data.h',
165         'common/aw_resource.h',
166         'common/aw_switches.cc',
167         'common/aw_switches.h',
168         'common/gpu_memory_buffer_factory_proxy.cc',
169         'common/gpu_memory_buffer_factory_proxy.h',
170         'common/render_view_messages.cc',
171         'common/render_view_messages.h',
172         'common/renderer_picture_map.cc',
173         'common/renderer_picture_map.h',
174         'common/url_constants.cc',
175         'common/url_constants.h',
176         'lib/aw_browser_dependency_factory_impl.cc',
177         'lib/aw_browser_dependency_factory_impl.h',
178         'lib/main/aw_main_delegate.cc',
179         'lib/main/aw_main_delegate.h',
180         'public/browser/draw_gl.h',
181         'renderer/aw_content_renderer_client.cc',
182         'renderer/aw_content_renderer_client.h',
183         'renderer/aw_render_process_observer.cc',
184         'renderer/aw_render_process_observer.h',
185         'renderer/aw_render_view_ext.cc',
186         'renderer/aw_render_view_ext.h',
187         'renderer/view_renderer.cc',
188         'renderer/view_renderer.h',
189       ],
190     },
191     {
192       'target_name': 'android_webview_java',
193       'type': 'none',
194       'dependencies': [
195         '../components/components.gyp:navigation_interception_java',
196         '../components/components.gyp:web_contents_delegate_android_java',
197         '../content/content.gyp:content_java',
198         '../ui/ui.gyp:ui_java',
199       ],
200       'variables': {
201         'java_in_dir': '../android_webview/java',
202       },
203       'includes': [ '../build/java.gypi' ],
204     },
205   ],