diff options
author | Zeno Albisser <zeno.albisser@digia.com> | 2013-08-15 21:46:11 +0200 |
---|---|---|
committer | Zeno Albisser <zeno.albisser@digia.com> | 2013-08-15 21:46:11 +0200 |
commit | 679147eead574d186ebf3069647b4c23e8ccace6 (patch) | |
tree | fc247a0ac8ff119f7c8550879ebb6d3dd8d1ff69 /chromium/android_webview | |
download | qtwebengine-chromium-679147eead574d186ebf3069647b4c23e8ccace6.tar.gz |
Initial import.
Diffstat (limited to 'chromium/android_webview')
-rw-r--r-- | chromium/android_webview/all_webview.gyp | 31 | ||||
-rw-r--r-- | chromium/android_webview/android_webview.gyp | 207 | ||||
-rw-r--r-- | chromium/android_webview/android_webview_tests.gypi | 131 | ||||
-rw-r--r-- | chromium/android_webview/native/webview_native.gyp | 116 |
4 files changed, 485 insertions, 0 deletions
diff --git a/chromium/android_webview/all_webview.gyp b/chromium/android_webview/all_webview.gyp new file mode 100644 index 00000000000..e3e3fea5eb8 --- /dev/null +++ b/chromium/android_webview/all_webview.gyp @@ -0,0 +1,31 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This is used as the top-level gyp file for building WebView in the Android +# tree. It should depend only on native code, as we cannot currently generate +# correct makefiles to build Java code via gyp in the Android tree. + +{ + 'targets': [ + { + 'target_name': 'All', + 'type': 'none', + 'dependencies': [ + 'android_webview.gyp:libwebviewchromium', + + # Needed by android_webview_java + '../base/base.gyp:base_java_activity_state', + '../base/base.gyp:base_java_memory_pressure_level_list', + '../content/content.gyp:page_transition_types_java', + '../content/content.gyp:result_codes_java', + '../content/content.gyp:speech_recognition_error_java', + '../net/net.gyp:certificate_mime_types_java', + '../net/net.gyp:cert_verify_result_android_java', + '../net/net.gyp:net_errors_java', + '../net/net.gyp:private_key_types_java', + '../ui/ui.gyp:window_open_disposition_java', + ], + }, # target_name: All + ], # targets +} diff --git a/chromium/android_webview/android_webview.gyp b/chromium/android_webview/android_webview.gyp new file mode 100644 index 00000000000..165399768b5 --- /dev/null +++ b/chromium/android_webview/android_webview.gyp @@ -0,0 +1,207 @@ +# Copyright 2009 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'variables': { + 'chromium_code': 1, + }, + 'includes': [ + 'android_webview_tests.gypi', + ], + 'targets': [ + { + 'target_name': 'libwebviewchromium', + 'type': 'shared_library', + 'android_unmangled_name': 1, + 'dependencies': [ + 'android_webview_common', + ], + 'conditions': [ + # The general approach is to allow the executable target to choose + # the allocator, but as in the WebView case we are building a library + # only, put the dependency on the allocator here + [ 'android_webview_build==1 and android_use_tcmalloc==1', { + 'dependencies': [ + '../base/allocator/allocator.gyp:allocator', ], + }], + ], + 'ldflags': [ + # fix linking to hidden symbols and re-enable this (crbug.com/157326) + '-Wl,--no-fatal-warnings' + ], + 'sources': [ + 'lib/main/webview_entry_point.cc', + ], + }, + { + 'target_name': 'android_webview_pak', + 'type': 'none', + 'dependencies': [ + '<(DEPTH)/content/content_resources.gyp:content_resources', + '<(DEPTH)/net/net.gyp:net_resources', + '<(DEPTH)/ui/ui.gyp:ui_resources', + '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources', + ], + 'variables': { + 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py', + }, + 'actions': [ + { + 'action_name': 'repack_android_webview_pack', + 'variables': { + 'pak_inputs': [ + '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak', + '<(SHARED_INTERMEDIATE_DIR)/webkit/blink_resources.pak', + '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak', + ], + }, + 'inputs': [ + '<(repack_path)', + '<@(pak_inputs)', + ], + 'outputs': [ + '<(PRODUCT_DIR)/android_webview_apk/assets/webviewchromium.pak', + ], + 'action': ['python', '<(repack_path)', '<@(_outputs)', + '<@(pak_inputs)'], + } + ], + }, + { + 'target_name': 'android_webview_common', + 'type': 'static_library', + 'dependencies': [ + '../android_webview/native/webview_native.gyp:webview_native', + '../components/components.gyp:auto_login_parser', + '../components/components.gyp:autofill_content_renderer', + '../components/components.gyp:navigation_interception', + '../components/components.gyp:visitedlink_browser', + '../components/components.gyp:visitedlink_renderer', + '../components/components.gyp:web_contents_delegate_android', + '../content/content.gyp:content_app_both', + '../skia/skia.gyp:skia', + '../gpu/gpu.gyp:command_buffer_service', + '../gpu/gpu.gyp:gles2_implementation', + '../ui/gl/gl.gyp:gl', + '../ui/ui.gyp:shell_dialogs', + '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu', + 'android_webview_pak', + ], + 'include_dirs': [ + '..', + '../skia/config', + '<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/', + ], + 'sources': [ + 'browser/aw_browser_context.cc', + 'browser/aw_browser_context.h', + 'browser/aw_browser_main_parts.cc', + 'browser/aw_browser_main_parts.h', + 'browser/aw_contents_client_bridge_base.cc', + 'browser/aw_contents_client_bridge_base.h', + 'browser/aw_content_browser_client.cc', + 'browser/aw_content_browser_client.h', + 'browser/aw_contents_io_thread_client.h', + 'browser/aw_cookie_access_policy.cc', + 'browser/aw_cookie_access_policy.h', + 'browser/aw_devtools_delegate.cc', + 'browser/aw_devtools_delegate.h', + 'browser/aw_download_manager_delegate.cc', + 'browser/aw_download_manager_delegate.h', + 'browser/aw_form_database_service.cc', + 'browser/aw_form_database_service.h', + 'browser/aw_gl_surface.cc', + 'browser/aw_gl_surface.h', + 'browser/aw_http_auth_handler_base.cc', + 'browser/aw_http_auth_handler_base.h', + 'browser/aw_javascript_dialog_manager.cc', + 'browser/aw_javascript_dialog_manager.h', + 'browser/aw_login_delegate.cc', + 'browser/aw_login_delegate.h', + 'browser/aw_quota_manager_bridge.cc', + 'browser/aw_quota_manager_bridge.h', + 'browser/aw_quota_permission_context.cc', + 'browser/aw_quota_permission_context.h', + 'browser/aw_pref_store.cc', + 'browser/aw_pref_store.h', + 'browser/aw_request_interceptor.cc', + 'browser/aw_request_interceptor.h', + 'browser/aw_result_codes.h', + 'browser/browser_view_renderer.h', + 'browser/find_helper.cc', + 'browser/find_helper.h', + 'browser/gpu_memory_buffer_factory_impl.cc', + 'browser/gpu_memory_buffer_factory_impl.h', + 'browser/icon_helper.cc', + 'browser/icon_helper.h', + 'browser/in_process_view_renderer.cc', + 'browser/in_process_view_renderer.h', + 'browser/input_stream.h', + 'browser/intercepted_request_data.h', + 'browser/jni_dependency_factory.h', + 'browser/gl_view_renderer_manager.cc', + 'browser/gl_view_renderer_manager.h', + 'browser/net/android_stream_reader_url_request_job.cc', + 'browser/net/android_stream_reader_url_request_job.h', + 'browser/net/aw_network_delegate.cc', + 'browser/net/aw_network_delegate.h', + 'browser/net/aw_url_request_context_getter.cc', + 'browser/net/aw_url_request_context_getter.h', + 'browser/net/aw_url_request_job_factory.cc', + 'browser/net/aw_url_request_job_factory.h', + 'browser/net_disk_cache_remover.cc', + 'browser/net_disk_cache_remover.h', + 'browser/net/init_native_callback.h', + 'browser/net/input_stream_reader.cc', + 'browser/net/input_stream_reader.h', + 'browser/renderer_host/aw_render_view_host_ext.cc', + 'browser/renderer_host/aw_render_view_host_ext.h', + 'browser/renderer_host/aw_resource_dispatcher_host_delegate.cc', + 'browser/renderer_host/aw_resource_dispatcher_host_delegate.h', + 'browser/scoped_allow_wait_for_legacy_web_view_api.h', + 'browser/scoped_app_gl_state_restore.cc', + 'browser/scoped_app_gl_state_restore.h', + 'common/android_webview_message_generator.cc', + 'common/android_webview_message_generator.h', + 'common/aw_content_client.cc', + 'common/aw_content_client.h', + 'common/aw_hit_test_data.cc', + 'common/aw_hit_test_data.h', + 'common/aw_resource.h', + 'common/aw_switches.cc', + 'common/aw_switches.h', + 'common/render_view_messages.cc', + 'common/render_view_messages.h', + 'common/url_constants.cc', + 'common/url_constants.h', + 'lib/aw_browser_dependency_factory_impl.cc', + 'lib/aw_browser_dependency_factory_impl.h', + 'lib/main/aw_main_delegate.cc', + 'lib/main/aw_main_delegate.h', + 'public/browser/draw_gl.h', + 'renderer/aw_content_renderer_client.cc', + 'renderer/aw_content_renderer_client.h', + 'renderer/aw_render_process_observer.cc', + 'renderer/aw_render_process_observer.h', + 'renderer/aw_render_view_ext.cc', + 'renderer/aw_render_view_ext.h', + ], + }, + { + 'target_name': 'android_webview_java', + 'type': 'none', + 'dependencies': [ + '../components/components.gyp:navigation_interception_java', + '../components/components.gyp:web_contents_delegate_android_java', + '../content/content.gyp:content_java', + '../ui/ui.gyp:ui_java', + ], + 'variables': { + 'java_in_dir': '../android_webview/java', + }, + 'includes': [ '../build/java.gypi' ], + }, + ], +} diff --git a/chromium/android_webview/android_webview_tests.gypi b/chromium/android_webview/android_webview_tests.gypi new file mode 100644 index 00000000000..bb9cc0f195d --- /dev/null +++ b/chromium/android_webview/android_webview_tests.gypi @@ -0,0 +1,131 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'targets': [ + { + 'target_name': 'android_webview_apk', + 'type': 'none', + 'dependencies': [ + 'libwebviewchromium', + 'android_webview_java', + 'android_webview_pak', + ], + 'variables': { + 'apk_name': 'AndroidWebView', + 'java_in_dir': 'test/shell', + 'native_lib_target': 'libwebviewchromium', + 'resource_dir': 'test/shell/res', + 'additional_input_paths': [ + '<(PRODUCT_DIR)/android_webview_apk/assets/webviewchromium.pak', + '<(PRODUCT_DIR)/android_webview_apk/assets/asset_file.html', + '<(PRODUCT_DIR)/android_webview_apk/assets/asset_icon.png', + '<(PRODUCT_DIR)/android_webview_apk/assets/full_screen_video_test.html', + ], + }, + 'copies': [ + { + 'destination': '<(PRODUCT_DIR)/android_webview_apk/assets', + 'files': [ + '<(java_in_dir)/assets/asset_file.html', + '<(java_in_dir)/assets/asset_icon.png', + '<(java_in_dir)/assets/full_screen_video_test.html', + ], + }, + ], + 'includes': [ '../build/java_apk.gypi' ], + }, + { + # android_webview_apk creates a .jar as a side effect. Any java + # targets that need that .jar in their classpath should depend on this + # target. For more details see the chromium_testshell_java target. + 'target_name': 'android_webview_apk_java', + 'type': 'none', + 'dependencies': [ + 'android_webview_apk', + ], + 'includes': [ '../build/apk_fake_jar.gypi' ], + }, + { + 'target_name': 'android_webview_test_apk', + 'type': 'none', + 'dependencies': [ + '../base/base.gyp:base_java_test_support', + '../content/content.gyp:content_java_test_support', + '../net/net.gyp:net_java_test_support', + 'android_webview_apk_java', + ], + 'variables': { + 'apk_name': 'AndroidWebViewTest', + 'java_in_dir': '../android_webview/javatests', + 'is_test_apk': 1, + }, + 'includes': [ '../build/java_apk.gypi' ], + }, + { + 'target_name': 'android_webview_unittests', + 'type': '<(gtest_target_type)', + 'dependencies': [ + '../base/base.gyp:test_support_base', + '../content/content.gyp:test_support_content', + '../net/net.gyp:net_test_support', + '../testing/android/native_test.gyp:native_test_native_code', + '../testing/gmock.gyp:gmock', + '../testing/gtest.gyp:gtest', + '../ui/ui.gyp:ui_jni_headers', + 'android_webview_common', + ], + 'include_dirs': [ + '..', + '../skia/config', + '<(SHARED_INTERMEDIATE_DIR)/android_webview_unittests', + ], + 'sources': [ + 'browser/aw_form_database_service_unittest.cc', + 'browser/net/android_stream_reader_url_request_job_unittest.cc', + 'browser/net/input_stream_reader_unittest.cc', + 'lib/main/webview_tests.cc', + 'native/input_stream_unittest.cc', + 'native/state_serializer_unittests.cc', + ], + }, + { + 'target_name': 'android_webview_unittest_java', + 'type': 'none', + 'dependencies': [ + '../base/base.gyp:base_java_test_support', + '../content/content.gyp:content_java_test_support', + 'android_webview_java', + ], + 'variables': { + 'java_in_dir': '../android_webview/unittestjava', + }, + 'includes': [ '../build/java.gypi' ], + }, + { + 'target_name': 'android_webview_unittests_jni', + 'type': 'none', + 'sources': [ + '../android_webview/unittestjava/src/org/chromium/android_webview/unittest/InputStreamUnittest.java', + ], + 'variables': { + 'jni_gen_package': 'android_webview_unittests', + }, + 'includes': [ '../build/jni_generator.gypi' ], + }, + { + 'target_name': 'android_webview_unittests_apk', + 'type': 'none', + 'dependencies': [ + 'android_webview_unittest_java', + 'android_webview_unittests', + 'android_webview_unittests_jni', + ], + 'variables': { + 'test_suite_name': 'android_webview_unittests', + 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)android_webview_unittests<(SHARED_LIB_SUFFIX)', + }, + 'includes': [ '../build/apk_test.gypi' ], + }, + ], +} diff --git a/chromium/android_webview/native/webview_native.gyp b/chromium/android_webview/native/webview_native.gyp new file mode 100644 index 00000000000..b1d7082f206 --- /dev/null +++ b/chromium/android_webview/native/webview_native.gyp @@ -0,0 +1,116 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'variables': { + 'chromium_code': 1, + }, + 'targets': [ + { + 'target_name': 'webview_native', + 'type': 'static_library', + 'dependencies': [ + '../../base/base.gyp:base_static', + '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + '../../components/components.gyp:autofill_content_browser', + '../../components/components.gyp:web_contents_delegate_android', + '../../cc/cc.gyp:cc', + '../../net/net.gyp:net', + '../../skia/skia.gyp:skia', + '../../ui/ui.gyp:ui', + '../../webkit/common/user_agent/webkit_user_agent.gyp:user_agent', + '../../webkit/common/webkit_common.gyp:webkit_common', + '../../webkit/storage_browser.gyp:webkit_storage_browser', + '../../webkit/storage_common.gyp:webkit_storage_common', + 'android_webview_native_jni', + ], + 'include_dirs': [ + '../..', + '../../skia/config', + '<(SHARED_INTERMEDIATE_DIR)/android_webview', + ], + 'sources': [ + 'android_protocol_handler.cc', + 'android_protocol_handler.h', + 'android_webview_jni_registrar.cc', + 'android_webview_jni_registrar.h', + 'aw_autofill_manager_delegate.cc', + 'aw_autofill_manager_delegate.h', + 'aw_browser_dependency_factory.cc', + 'aw_browser_dependency_factory.h', + 'aw_contents.cc', + 'aw_contents.h', + 'aw_contents_client_bridge.cc', + 'aw_contents_client_bridge.h', + 'aw_contents_io_thread_client_impl.cc', + 'aw_contents_io_thread_client_impl.h', + 'aw_form_database.cc', + 'aw_form_database.h', + 'aw_geolocation_permission_context.cc', + 'aw_geolocation_permission_context.h', + 'aw_http_auth_handler.cc', + 'aw_http_auth_handler.h', + 'aw_picture.cc', + 'aw_picture.h', + 'aw_quota_manager_bridge_impl.cc', + 'aw_quota_manager_bridge_impl.h', + 'aw_resource.cc', + 'aw_resource.h', + 'aw_settings.cc', + 'aw_settings.h', + 'aw_web_contents_delegate.cc', + 'aw_web_contents_delegate.h', + 'aw_web_contents_view_delegate.cc', + 'aw_web_contents_view_delegate.h', + 'cookie_manager.cc', + 'cookie_manager.h', + 'input_stream_impl.cc', + 'input_stream_impl.h', + 'intercepted_request_data_impl.cc', + 'intercepted_request_data_impl.h', + 'java_browser_view_renderer_helper.cc', + 'java_browser_view_renderer_helper.h', + 'net_init_native_callback.cc', + 'state_serializer.cc', + 'state_serializer.h', + ], + }, + { + 'target_name': 'android_jar_jni_headers', + 'type': 'none', + 'variables': { + 'jni_gen_package': 'android_webview', + 'input_java_class': 'java/io/InputStream.class', + }, + 'includes': [ '../../build/jar_file_jni_generator.gypi' ], + }, + { + 'target_name': 'android_webview_native_jni', + 'type': 'none', + 'sources': [ + '../java/src/org/chromium/android_webview/AndroidProtocolHandler.java', + '../java/src/org/chromium/android_webview/AwAutofillManagerDelegate.java', + '../java/src/org/chromium/android_webview/AwContents.java', + '../java/src/org/chromium/android_webview/AwContentsClientBridge.java', + '../java/src/org/chromium/android_webview/AwContentsIoThreadClient.java', + '../java/src/org/chromium/android_webview/AwCookieManager.java', + '../java/src/org/chromium/android_webview/AwFormDatabase.java', + '../java/src/org/chromium/android_webview/AwHttpAuthHandler.java', + '../java/src/org/chromium/android_webview/AwPicture.java', + '../java/src/org/chromium/android_webview/AwQuotaManagerBridge.java', + '../java/src/org/chromium/android_webview/AwResource.java', + '../java/src/org/chromium/android_webview/AwSettings.java', + '../java/src/org/chromium/android_webview/AwWebContentsDelegate.java', + '../java/src/org/chromium/android_webview/InterceptedRequestData.java', + '../java/src/org/chromium/android_webview/JavaBrowserViewRendererHelper.java', + ], + 'variables': { + 'jni_gen_package': 'android_webview', + }, + 'includes': [ '../../build/jni_generator.gypi' ], + 'dependencies': [ + 'android_jar_jni_headers', + ], + }, + ], +} |