diff options
author | Ben Murdoch <benm@google.com> | 2013-07-17 14:55:54 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2013-07-17 14:55:54 +0100 |
commit | 7dbb3d5cf0c15f500944d211057644d6a2f37371 (patch) | |
tree | 701119ba0596f51b0ab466d6472b0f98211359c5 /android_webview | |
parent | b2ecf4836a0eb284ddac7746b1f7ba613777a739 (diff) | |
download | chromium_org-7dbb3d5cf0c15f500944d211057644d6a2f37371.tar.gz |
Merge from Chromium at DEPS revision r212014
This commit was generated by merge_to_master.py.
Change-Id: Ie0f261e9682cd8abea1eea1e51beab83d5eea21a
Diffstat (limited to 'android_webview')
85 files changed, 1619 insertions, 570 deletions
diff --git a/android_webview/android_webview.gyp b/android_webview/android_webview.gyp index b78816ad50..90a134c091 100644 --- a/android_webview/android_webview.gyp +++ b/android_webview/android_webview.gyp @@ -31,7 +31,7 @@ '<(DEPTH)/content/content_resources.gyp:content_resources', '<(DEPTH)/net/net.gyp:net_resources', '<(DEPTH)/ui/ui.gyp:ui_resources', - '<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources', + '<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources', ], 'variables': { 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py', @@ -146,7 +146,8 @@ '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_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', diff --git a/android_webview/android_webview_common.target.darwin-arm.mk b/android_webview/android_webview_common.target.darwin-arm.mk index 2609eed0de..59ab14eff5 100644 --- a/android_webview/android_webview_common.target.darwin-arm.mk +++ b/android_webview/android_webview_common.target.darwin-arm.mk @@ -54,6 +54,7 @@ LOCAL_SRC_FILES := \ android_webview/browser/net/input_stream_reader.cc \ android_webview/browser/renderer_host/aw_render_view_host_ext.cc \ android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc \ + android_webview/browser/scoped_app_gl_state_restore.cc \ android_webview/common/android_webview_message_generator.cc \ android_webview/common/aw_content_client.cc \ android_webview/common/aw_hit_test_data.cc \ @@ -104,8 +105,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -212,8 +214,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/android_webview_common.target.darwin-mips.mk b/android_webview/android_webview_common.target.darwin-mips.mk index a255836acb..35256dd64d 100644 --- a/android_webview/android_webview_common.target.darwin-mips.mk +++ b/android_webview/android_webview_common.target.darwin-mips.mk @@ -54,6 +54,7 @@ LOCAL_SRC_FILES := \ android_webview/browser/net/input_stream_reader.cc \ android_webview/browser/renderer_host/aw_render_view_host_ext.cc \ android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc \ + android_webview/browser/scoped_app_gl_state_restore.cc \ android_webview/common/android_webview_message_generator.cc \ android_webview/common/aw_content_client.cc \ android_webview/common/aw_hit_test_data.cc \ @@ -104,6 +105,8 @@ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -210,6 +213,8 @@ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/android_webview_common.target.darwin-x86.mk b/android_webview/android_webview_common.target.darwin-x86.mk index f8e7c17767..8511f6021a 100644 --- a/android_webview/android_webview_common.target.darwin-x86.mk +++ b/android_webview/android_webview_common.target.darwin-x86.mk @@ -54,6 +54,7 @@ LOCAL_SRC_FILES := \ android_webview/browser/net/input_stream_reader.cc \ android_webview/browser/renderer_host/aw_render_view_host_ext.cc \ android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc \ + android_webview/browser/scoped_app_gl_state_restore.cc \ android_webview/common/android_webview_message_generator.cc \ android_webview/common/aw_content_client.cc \ android_webview/common/aw_hit_test_data.cc \ @@ -106,8 +107,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -217,8 +219,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/android_webview_common.target.linux-arm.mk b/android_webview/android_webview_common.target.linux-arm.mk index 2609eed0de..59ab14eff5 100644 --- a/android_webview/android_webview_common.target.linux-arm.mk +++ b/android_webview/android_webview_common.target.linux-arm.mk @@ -54,6 +54,7 @@ LOCAL_SRC_FILES := \ android_webview/browser/net/input_stream_reader.cc \ android_webview/browser/renderer_host/aw_render_view_host_ext.cc \ android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc \ + android_webview/browser/scoped_app_gl_state_restore.cc \ android_webview/common/android_webview_message_generator.cc \ android_webview/common/aw_content_client.cc \ android_webview/common/aw_hit_test_data.cc \ @@ -104,8 +105,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -212,8 +214,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/android_webview_common.target.linux-mips.mk b/android_webview/android_webview_common.target.linux-mips.mk index a255836acb..35256dd64d 100644 --- a/android_webview/android_webview_common.target.linux-mips.mk +++ b/android_webview/android_webview_common.target.linux-mips.mk @@ -54,6 +54,7 @@ LOCAL_SRC_FILES := \ android_webview/browser/net/input_stream_reader.cc \ android_webview/browser/renderer_host/aw_render_view_host_ext.cc \ android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc \ + android_webview/browser/scoped_app_gl_state_restore.cc \ android_webview/common/android_webview_message_generator.cc \ android_webview/common/aw_content_client.cc \ android_webview/common/aw_hit_test_data.cc \ @@ -104,6 +105,8 @@ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -210,6 +213,8 @@ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/android_webview_common.target.linux-x86.mk b/android_webview/android_webview_common.target.linux-x86.mk index f8e7c17767..8511f6021a 100644 --- a/android_webview/android_webview_common.target.linux-x86.mk +++ b/android_webview/android_webview_common.target.linux-x86.mk @@ -54,6 +54,7 @@ LOCAL_SRC_FILES := \ android_webview/browser/net/input_stream_reader.cc \ android_webview/browser/renderer_host/aw_render_view_host_ext.cc \ android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc \ + android_webview/browser/scoped_app_gl_state_restore.cc \ android_webview/common/android_webview_message_generator.cc \ android_webview/common/aw_content_client.cc \ android_webview/common/aw_hit_test_data.cc \ @@ -106,8 +107,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -217,8 +219,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/android_webview_pak.target.darwin-arm.mk b/android_webview/android_webview_pak.target.darwin-arm.mk index c3a561b706..9c08642dc9 100644 --- a/android_webview/android_webview_pak.target.darwin-arm.mk +++ b/android_webview/android_webview_pak.target.darwin-arm.mk @@ -15,7 +15,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,content_content_resources_gyp)/content_resources.stamp \ $(call intermediates-dir-for,GYP,net_net_resources_gyp)/net_resources.stamp \ $(call intermediates-dir-for,GYP,ui_ui_resources_gyp)/ui_resources.stamp \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_resources_gyp)/webkit_resources.stamp + $(call intermediates-dir-for,GYP,webkit_webkit_resources_gyp)/webkit_resources.stamp ### Rules for action "repack_android_webview_pack": $(gyp_shared_intermediate_dir)/android_webview_apk/assets/webviewchromium.pak: gyp_local_path := $(LOCAL_PATH) diff --git a/android_webview/android_webview_pak.target.darwin-mips.mk b/android_webview/android_webview_pak.target.darwin-mips.mk index c3a561b706..9c08642dc9 100644 --- a/android_webview/android_webview_pak.target.darwin-mips.mk +++ b/android_webview/android_webview_pak.target.darwin-mips.mk @@ -15,7 +15,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,content_content_resources_gyp)/content_resources.stamp \ $(call intermediates-dir-for,GYP,net_net_resources_gyp)/net_resources.stamp \ $(call intermediates-dir-for,GYP,ui_ui_resources_gyp)/ui_resources.stamp \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_resources_gyp)/webkit_resources.stamp + $(call intermediates-dir-for,GYP,webkit_webkit_resources_gyp)/webkit_resources.stamp ### Rules for action "repack_android_webview_pack": $(gyp_shared_intermediate_dir)/android_webview_apk/assets/webviewchromium.pak: gyp_local_path := $(LOCAL_PATH) diff --git a/android_webview/android_webview_pak.target.darwin-x86.mk b/android_webview/android_webview_pak.target.darwin-x86.mk index c3a561b706..9c08642dc9 100644 --- a/android_webview/android_webview_pak.target.darwin-x86.mk +++ b/android_webview/android_webview_pak.target.darwin-x86.mk @@ -15,7 +15,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,content_content_resources_gyp)/content_resources.stamp \ $(call intermediates-dir-for,GYP,net_net_resources_gyp)/net_resources.stamp \ $(call intermediates-dir-for,GYP,ui_ui_resources_gyp)/ui_resources.stamp \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_resources_gyp)/webkit_resources.stamp + $(call intermediates-dir-for,GYP,webkit_webkit_resources_gyp)/webkit_resources.stamp ### Rules for action "repack_android_webview_pack": $(gyp_shared_intermediate_dir)/android_webview_apk/assets/webviewchromium.pak: gyp_local_path := $(LOCAL_PATH) diff --git a/android_webview/android_webview_pak.target.linux-arm.mk b/android_webview/android_webview_pak.target.linux-arm.mk index c3a561b706..9c08642dc9 100644 --- a/android_webview/android_webview_pak.target.linux-arm.mk +++ b/android_webview/android_webview_pak.target.linux-arm.mk @@ -15,7 +15,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,content_content_resources_gyp)/content_resources.stamp \ $(call intermediates-dir-for,GYP,net_net_resources_gyp)/net_resources.stamp \ $(call intermediates-dir-for,GYP,ui_ui_resources_gyp)/ui_resources.stamp \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_resources_gyp)/webkit_resources.stamp + $(call intermediates-dir-for,GYP,webkit_webkit_resources_gyp)/webkit_resources.stamp ### Rules for action "repack_android_webview_pack": $(gyp_shared_intermediate_dir)/android_webview_apk/assets/webviewchromium.pak: gyp_local_path := $(LOCAL_PATH) diff --git a/android_webview/android_webview_pak.target.linux-mips.mk b/android_webview/android_webview_pak.target.linux-mips.mk index c3a561b706..9c08642dc9 100644 --- a/android_webview/android_webview_pak.target.linux-mips.mk +++ b/android_webview/android_webview_pak.target.linux-mips.mk @@ -15,7 +15,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,content_content_resources_gyp)/content_resources.stamp \ $(call intermediates-dir-for,GYP,net_net_resources_gyp)/net_resources.stamp \ $(call intermediates-dir-for,GYP,ui_ui_resources_gyp)/ui_resources.stamp \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_resources_gyp)/webkit_resources.stamp + $(call intermediates-dir-for,GYP,webkit_webkit_resources_gyp)/webkit_resources.stamp ### Rules for action "repack_android_webview_pack": $(gyp_shared_intermediate_dir)/android_webview_apk/assets/webviewchromium.pak: gyp_local_path := $(LOCAL_PATH) diff --git a/android_webview/android_webview_pak.target.linux-x86.mk b/android_webview/android_webview_pak.target.linux-x86.mk index c3a561b706..9c08642dc9 100644 --- a/android_webview/android_webview_pak.target.linux-x86.mk +++ b/android_webview/android_webview_pak.target.linux-x86.mk @@ -15,7 +15,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,content_content_resources_gyp)/content_resources.stamp \ $(call intermediates-dir-for,GYP,net_net_resources_gyp)/net_resources.stamp \ $(call intermediates-dir-for,GYP,ui_ui_resources_gyp)/ui_resources.stamp \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_resources_gyp)/webkit_resources.stamp + $(call intermediates-dir-for,GYP,webkit_webkit_resources_gyp)/webkit_resources.stamp ### Rules for action "repack_android_webview_pack": $(gyp_shared_intermediate_dir)/android_webview_apk/assets/webviewchromium.pak: gyp_local_path := $(LOCAL_PATH) diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc index 06793fa217..7c94d794dd 100644 --- a/android_webview/browser/aw_browser_context.cc +++ b/android_webview/browser/aw_browser_context.cc @@ -157,7 +157,7 @@ void AwBrowserContext::CreateUserPrefServiceIfNecessary() { pref_service_builder.Create(pref_registry)); } -base::FilePath AwBrowserContext::GetPath() { +base::FilePath AwBrowserContext::GetPath() const { return context_storage_path_; } @@ -180,6 +180,15 @@ net::URLRequestContextGetter* AwBrowserContext::GetMediaRequestContext() { return GetRequestContext(); } +void AwBrowserContext::RequestMIDISysExPermission( + int render_process_id, + int render_view_id, + const GURL& requesting_frame, + const MIDISysExPermissionCallback& callback) { + // TODO(toyoshim): Android is not supported yet. + callback.Run(false); +} + net::URLRequestContextGetter* AwBrowserContext::GetMediaRequestContextForRenderProcess( int renderer_child_id) { @@ -216,12 +225,6 @@ AwBrowserContext::GetGeolocationPermissionContext() { return geolocation_permission_context_.get(); } -content::SpeechRecognitionPreferences* -AwBrowserContext::GetSpeechRecognitionPreferences() { - // By default allows profanities in speech recognition if return NULL. - return NULL; -} - quota::SpecialStoragePolicy* AwBrowserContext::GetSpecialStoragePolicy() { // TODO(boliu): Implement this so we are not relying on default behavior. NOTIMPLEMENTED(); diff --git a/android_webview/browser/aw_browser_context.h b/android_webview/browser/aw_browser_context.h index 4f281c1126..8d1ff97581 100644 --- a/android_webview/browser/aw_browser_context.h +++ b/android_webview/browser/aw_browser_context.h @@ -75,7 +75,7 @@ class AwBrowserContext : public content::BrowserContext, void CreateUserPrefServiceIfNecessary(); // content::BrowserContext implementation. - virtual base::FilePath GetPath() OVERRIDE; + virtual base::FilePath GetPath() const OVERRIDE; virtual bool IsOffTheRecord() const OVERRIDE; virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( @@ -86,13 +86,16 @@ class AwBrowserContext : public content::BrowserContext, virtual net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( const base::FilePath& partition_path, bool in_memory) OVERRIDE; + virtual void RequestMIDISysExPermission( + int render_process_id, + int render_view_id, + const GURL& requesting_frame, + const MIDISysExPermissionCallback& callback) OVERRIDE; virtual content::ResourceContext* GetResourceContext() OVERRIDE; virtual content::DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE; virtual content::GeolocationPermissionContext* GetGeolocationPermissionContext() OVERRIDE; - virtual content::SpeechRecognitionPreferences* - GetSpeechRecognitionPreferences() OVERRIDE; virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; // visitedlink::VisitedLinkDelegate implementation. diff --git a/android_webview/browser/aw_form_database_service_unittest.cc b/android_webview/browser/aw_form_database_service_unittest.cc index 2a08c1fe83..4f4b25cb53 100644 --- a/android_webview/browser/aw_form_database_service_unittest.cc +++ b/android_webview/browser/aw_form_database_service_unittest.cc @@ -8,7 +8,7 @@ #include "base/android/jni_android.h" #include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" -#include "base/message_loop.h" +#include "base/message_loop/message_loop.h" #include "base/strings/utf_string_conversions.h" #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" #include "components/autofill/core/common/form_field_data.h" diff --git a/android_webview/browser/browser_view_renderer.h b/android_webview/browser/browser_view_renderer.h index ab0a59e01b..bcbc61a28e 100644 --- a/android_webview/browser/browser_view_renderer.h +++ b/android_webview/browser/browser_view_renderer.h @@ -43,6 +43,9 @@ class BrowserViewRenderer { // Try to set the view's scroll offset to |new_value|. virtual void ScrollContainerViewTo(gfx::Vector2d new_value) = 0; + // Handle overscroll. + virtual void DidOverscroll(gfx::Vector2d overscroll_delta) = 0; + protected: virtual ~Client() {} }; @@ -108,6 +111,7 @@ class BrowserViewRenderer { // Sets the scale for logical<->physical pixel conversions. virtual void SetDipScale(float dip_scale) = 0; + virtual void SetPageScaleFactor(float page_scale_factor) = 0; // Set the root layer scroll offset to |new_value|. virtual void ScrollTo(gfx::Vector2d new_value) = 0; diff --git a/android_webview/browser/find_helper.cc b/android_webview/browser/find_helper.cc index 63be20c698..72f7a93457 100644 --- a/android_webview/browser/find_helper.cc +++ b/android_webview/browser/find_helper.cc @@ -5,7 +5,7 @@ #include "android_webview/browser/find_helper.h" #include "android_webview/browser/scoped_allow_wait_for_legacy_web_view_api.h" -#include "base/message_loop.h" +#include "base/message_loop/message_loop.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" #include "content/public/common/stop_find_action.h" diff --git a/android_webview/browser/in_process_view_renderer.cc b/android_webview/browser/in_process_view_renderer.cc index 00e06acdc3..09a0e02337 100644 --- a/android_webview/browser/in_process_view_renderer.cc +++ b/android_webview/browser/in_process_view_renderer.cc @@ -6,15 +6,14 @@ #include <android/bitmap.h> +#include "android_webview/browser/scoped_app_gl_state_restore.h" #include "android_webview/public/browser/draw_gl.h" #include "android_webview/public/browser/draw_sw.h" #include "base/android/jni_android.h" #include "base/command_line.h" #include "base/debug/trace_event.h" #include "base/logging.h" -#include "content/public/browser/android/content_view_core.h" #include "content/public/browser/android/synchronous_compositor.h" -#include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" #include "skia/ext/refptr.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -22,172 +21,19 @@ #include "third_party/skia/include/core/SkDevice.h" #include "third_party/skia/include/core/SkGraphics.h" #include "third_party/skia/include/core/SkPicture.h" -#include "ui/gfx/size_conversions.h" #include "ui/gfx/skia_util.h" #include "ui/gfx/transform.h" #include "ui/gfx/vector2d_conversions.h" #include "ui/gfx/vector2d_f.h" -#include "ui/gl/gl_bindings.h" - -// TODO(leandrogracia): Borrowed from gl2ext.h. Cannot be included due to -// conflicts with gl_bindings.h and the EGL library methods -// (eglGetCurrentContext). -#ifndef GL_TEXTURE_EXTERNAL_OES -#define GL_TEXTURE_EXTERNAL_OES 0x8D65 -#endif - -#ifndef GL_TEXTURE_BINDING_EXTERNAL_OES -#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 -#endif using base::android::AttachCurrentThread; using base::android::JavaRef; using base::android::ScopedJavaLocalRef; -using content::ContentViewCore; namespace android_webview { namespace { -class GLStateRestore { - public: - GLStateRestore() { -#if !defined(NDEBUG) - { - GLint vertex_array_buffer_binding; - glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &vertex_array_buffer_binding); - DCHECK_EQ(0, vertex_array_buffer_binding); - - GLint index_array_buffer_binding; - glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, - &index_array_buffer_binding); - DCHECK_EQ(0, index_array_buffer_binding); - } -#endif // !defined(NDEBUG) - glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, - &texture_external_oes_binding_); - glGetIntegerv(GL_PACK_ALIGNMENT, &pack_alignment_); - glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpack_alignment_); - - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(vertex_attrib_); ++i) { - glGetVertexAttribiv( - i, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &vertex_attrib_[i].enabled); - glGetVertexAttribiv( - i, GL_VERTEX_ATTRIB_ARRAY_SIZE, &vertex_attrib_[i].size); - glGetVertexAttribiv( - i, GL_VERTEX_ATTRIB_ARRAY_TYPE, &vertex_attrib_[i].type); - glGetVertexAttribiv( - i, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, &vertex_attrib_[i].normalized); - glGetVertexAttribiv( - i, GL_VERTEX_ATTRIB_ARRAY_STRIDE, &vertex_attrib_[i].stride); - glGetVertexAttribPointerv( - i, GL_VERTEX_ATTRIB_ARRAY_POINTER, &vertex_attrib_[i].pointer); - } - - glGetBooleanv(GL_DEPTH_TEST, &depth_test_); - glGetBooleanv(GL_CULL_FACE, &cull_face_); - glGetBooleanv(GL_COLOR_WRITEMASK, color_mask_); - glGetBooleanv(GL_BLEND, &blend_enabled_); - glGetIntegerv(GL_BLEND_SRC_RGB, &blend_src_rgb_); - glGetIntegerv(GL_BLEND_SRC_ALPHA, &blend_src_alpha_); - glGetIntegerv(GL_BLEND_DST_RGB, &blend_dest_rgb_); - glGetIntegerv(GL_BLEND_DST_ALPHA, &blend_dest_alpha_); - glGetIntegerv(GL_ACTIVE_TEXTURE, &active_texture_); - glGetIntegerv(GL_VIEWPORT, viewport_); - glGetBooleanv(GL_SCISSOR_TEST, &scissor_test_); - glGetIntegerv(GL_SCISSOR_BOX, scissor_box_); - glGetIntegerv(GL_CURRENT_PROGRAM, ¤t_program_); - } - - ~GLStateRestore() { - glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture_external_oes_binding_); - glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment_); - glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment_); - - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(vertex_attrib_); ++i) { - glVertexAttribPointer(i, - vertex_attrib_[i].size, - vertex_attrib_[i].type, - vertex_attrib_[i].normalized, - vertex_attrib_[i].stride, - vertex_attrib_[i].pointer); - - if (vertex_attrib_[i].enabled) { - glEnableVertexAttribArray(i); - } else { - glDisableVertexAttribArray(i); - } - } - - if (depth_test_) { - glEnable(GL_DEPTH_TEST); - } else { - glDisable(GL_DEPTH_TEST); - } - - if (cull_face_) { - glEnable(GL_CULL_FACE); - } else { - glDisable(GL_CULL_FACE); - } - - glColorMask(color_mask_[0], color_mask_[1], color_mask_[2], color_mask_[3]); - - if (blend_enabled_) { - glEnable(GL_BLEND); - } else { - glDisable(GL_BLEND); - } - - glBlendFuncSeparate( - blend_src_rgb_, blend_dest_rgb_, blend_src_alpha_, blend_dest_alpha_); - glActiveTexture(active_texture_); - - glViewport(viewport_[0], viewport_[1], viewport_[2], viewport_[3]); - - if (scissor_test_) { - glEnable(GL_SCISSOR_TEST); - } else { - glDisable(GL_SCISSOR_TEST); - } - - glScissor( - scissor_box_[0], scissor_box_[1], scissor_box_[2], scissor_box_[3]); - - glUseProgram(current_program_); - - glBindBuffer(GL_ARRAY_BUFFER, 0); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); - } - - private: - GLint texture_external_oes_binding_; - GLint pack_alignment_; - GLint unpack_alignment_; - - struct { - GLint enabled; - GLint size; - GLint type; - GLint normalized; - GLint stride; - GLvoid* pointer; - } vertex_attrib_[3]; - - GLboolean depth_test_; - GLboolean cull_face_; - GLboolean color_mask_[4]; - GLboolean blend_enabled_; - GLint blend_src_rgb_; - GLint blend_src_alpha_; - GLint blend_dest_rgb_; - GLint blend_dest_alpha_; - GLint active_texture_; - GLint viewport_[4]; - GLboolean scissor_test_; - GLint scissor_box_[4]; - GLint current_program_; -}; const void* kUserDataKey = &kUserDataKey; @@ -310,10 +156,9 @@ InProcessViewRenderer::InProcessViewRenderer( compositor_(NULL), visible_(false), dip_scale_(0.0), + page_scale_factor_(1.0), continuous_invalidate_(false), block_invalidates_(false), - do_ensure_continuous_invalidation_task_pending_(false), - weak_factory_(this), width_(0), height_(0), attached_to_window_(false), @@ -352,10 +197,11 @@ bool InProcessViewRenderer::OnDraw(jobject java_canvas, const gfx::Rect& clip) { fallback_tick_.Cancel(); scroll_at_start_of_frame_ = scroll; - if (is_hardware_canvas && attached_to_window_ && compositor_ && - HardwareEnabled() && client_->RequestDrawGL(java_canvas)) { - // All set: we'll get a call on DrawGL when the time comes. - return true; + if (is_hardware_canvas && attached_to_window_ && HardwareEnabled()) { + // We should be performing a hardware draw here. If we don't have the + // comositor yet or if RequestDrawGL fails, it means we failed this draw and + // thus return false here to clear to background color for this draw. + return compositor_ && client_->RequestDrawGL(java_canvas); } // Perform a software draw block_invalidates_ = true; @@ -366,9 +212,6 @@ bool InProcessViewRenderer::OnDraw(jobject java_canvas, } void InProcessViewRenderer::DrawGL(AwDrawGLInfo* draw_info) { - if (!HardwareEnabled()) - return; - TRACE_EVENT0("android_webview", "InProcessViewRenderer::DrawGL"); DCHECK(visible_); @@ -381,7 +224,7 @@ void InProcessViewRenderer::DrawGL(AwDrawGLInfo* draw_info) { return; } - GLStateRestore state_restore; + ScopedAppGLStateRestore state_restore; if (attached_to_window_ && compositor_ && !hardware_initialized_) { TRACE_EVENT0("android_webview", "InitializeHwDraw"); @@ -403,8 +246,6 @@ void InProcessViewRenderer::DrawGL(AwDrawGLInfo* draw_info) { } last_egl_context_ = current_context; - // TODO(boliu): Make sure this is not called before compositor is initialized - // and GL is ready. Then make this a DCHECK. if (!compositor_) { TRACE_EVENT_INSTANT0( "android_webview", "EarlyOut_NoCompositor", TRACE_EVENT_SCOPE_THREAD); @@ -440,6 +281,12 @@ bool InProcessViewRenderer::DrawSWInternal(jobject java_canvas, return true; } + if (!compositor_) { + TRACE_EVENT_INSTANT0( + "android_webview", "EarlyOut_NoCompositor", TRACE_EVENT_SCOPE_THREAD); + return false; + } + JNIEnv* env = AttachCurrentThread(); AwDrawSWFunctionTable* sw_functions = GetAwDrawSWFunctionTable(); @@ -510,8 +357,11 @@ bool InProcessViewRenderer::DrawSWInternal(jobject java_canvas, base::android::ScopedJavaLocalRef<jobject> InProcessViewRenderer::CapturePicture() { - if (!GetAwDrawSWFunctionTable()) + if (!compositor_ || !GetAwDrawSWFunctionTable()) { + TRACE_EVENT_INSTANT0( + "android_webview", "EarlyOut_CapturePicture", TRACE_EVENT_SCOPE_THREAD); return ScopedJavaLocalRef<jobject>(); + } gfx::Size record_size(width_, height_); @@ -590,14 +440,20 @@ void InProcessViewRenderer::OnAttachedToWindow(int width, int height) { attached_to_window_ = true; width_ = width; height_ = height; - if (compositor_ && !hardware_initialized_) - client_->RequestDrawGL(NULL); } void InProcessViewRenderer::OnDetachedFromWindow() { TRACE_EVENT0("android_webview", "InProcessViewRenderer::OnDetachedFromWindow"); - // TODO(joth): Release GL resources. crbug.com/231986. + + if (hardware_initialized_) { + DCHECK(compositor_); + + ScopedAppGLStateRestore state_restore; + compositor_->ReleaseHwDraw(); + hardware_initialized_ = false; + } + attached_to_window_ = false; } @@ -621,9 +477,6 @@ void InProcessViewRenderer::DidInitializeCompositor( compositor_ = compositor; hardware_initialized_ = false; hardware_failed_ = false; - - if (attached_to_window_) - client_->RequestDrawGL(NULL); } void InProcessViewRenderer::DidDestroyCompositor( @@ -631,6 +484,12 @@ void InProcessViewRenderer::DidDestroyCompositor( TRACE_EVENT0("android_webview", "InProcessViewRenderer::DidDestroyCompositor"); DCHECK(compositor_ == compositor); + + // This can fail if Apps call destroy while the webview is still attached + // to the view tree. This is an illegal operation that will lead to leaks. + // Log for now. Consider a proper fix if this becomes a problem. + LOG_IF(ERROR, hardware_initialized_) + << "Destroy called before OnDetachedFromWindow. May Leak GL resources"; compositor_ = NULL; } @@ -652,6 +511,11 @@ void InProcessViewRenderer::SetDipScale(float dip_scale) { CHECK(dip_scale_ > 0); } +void InProcessViewRenderer::SetPageScaleFactor(float page_scale_factor) { + page_scale_factor_ = page_scale_factor; + CHECK(page_scale_factor_ > 0); +} + void InProcessViewRenderer::ScrollTo(gfx::Vector2d new_value) { DCHECK(dip_scale_ > 0); // In general we don't guarantee that the scroll offset transforms are @@ -661,7 +525,7 @@ void InProcessViewRenderer::ScrollTo(gfx::Vector2d new_value) { // The reason we explicitly do rounding here is that it seems to yeld the // most stabile transformation. gfx::Vector2dF new_value_css = gfx::ToRoundedVector2d( - gfx::ScaleVector2d(new_value, 1.0f / dip_scale_)); + gfx::ScaleVector2d(new_value, 1.0f / (dip_scale_ * page_scale_factor_))); DCHECK(scroll_offset_css_ != new_value_css); @@ -673,6 +537,8 @@ void InProcessViewRenderer::ScrollTo(gfx::Vector2d new_value) { void InProcessViewRenderer::SetTotalRootLayerScrollOffset( gfx::Vector2dF new_value_css) { + previous_accumulated_overscroll_ = gfx::Vector2dF(); + // TOOD(mkosiba): Add a DCHECK to say that this does _not_ get called during // DrawGl when http://crbug.com/249972 is fixed. if (scroll_offset_css_ == new_value_css) @@ -681,9 +547,10 @@ void InProcessViewRenderer::SetTotalRootLayerScrollOffset( scroll_offset_css_ = new_value_css; DCHECK(dip_scale_ > 0); + DCHECK(page_scale_factor_ > 0); - gfx::Vector2d scroll_offset = - gfx::ToRoundedVector2d(gfx::ScaleVector2d(new_value_css, dip_scale_)); + gfx::Vector2d scroll_offset = gfx::ToRoundedVector2d( + gfx::ScaleVector2d(new_value_css, dip_scale_ * page_scale_factor_)); client_->ScrollContainerViewTo(scroll_offset); } @@ -692,23 +559,22 @@ gfx::Vector2dF InProcessViewRenderer::GetTotalRootLayerScrollOffset() { return scroll_offset_css_; } -void InProcessViewRenderer::EnsureContinuousInvalidation( - AwDrawGLInfo* draw_info) { - if (continuous_invalidate_ && !block_invalidates_ && - !do_ensure_continuous_invalidation_task_pending_) { - do_ensure_continuous_invalidation_task_pending_ = true; - - base::MessageLoop::current()->PostTask( - FROM_HERE, - base::Bind(&InProcessViewRenderer::DoEnsureContinuousInvalidation, - weak_factory_.GetWeakPtr(), - static_cast<AwDrawGLInfo*>(NULL))); - } +void InProcessViewRenderer::DidOverscroll( + gfx::Vector2dF accumulated_overscroll, + gfx::Vector2dF current_fling_velocity) { + // TODO(mkosiba): Enable this once flinging is handled entirely Java-side. + // DCHECK(current_fling_velocity.IsZero()); + const float physical_pixel_scale = dip_scale_ * page_scale_factor_; + gfx::Vector2d overscroll_delta = gfx::ToRoundedVector2d(gfx::ScaleVector2d( + accumulated_overscroll - previous_accumulated_overscroll_, + physical_pixel_scale)); + previous_accumulated_overscroll_ += + gfx::ScaleVector2d(overscroll_delta, 1.0f / physical_pixel_scale); + client_->DidOverscroll(overscroll_delta); } -void InProcessViewRenderer::DoEnsureContinuousInvalidation( +void InProcessViewRenderer::EnsureContinuousInvalidation( AwDrawGLInfo* draw_info) { - do_ensure_continuous_invalidation_task_pending_ = false; if (continuous_invalidate_ && !block_invalidates_) { if (draw_info) { draw_info->dirty_left = draw_info->clip_left; @@ -738,7 +604,7 @@ void InProcessViewRenderer::FallbackTickFired() { "InProcessViewRenderer::FallbackTickFired", "continuous_invalidate_", continuous_invalidate_); - if (continuous_invalidate_) { + if (continuous_invalidate_ && compositor_) { SkDevice device(SkBitmap::kARGB_8888_Config, 1, 1); SkCanvas canvas(&device); block_invalidates_ = true; @@ -749,7 +615,8 @@ void InProcessViewRenderer::FallbackTickFired() { } bool InProcessViewRenderer::CompositeSW(SkCanvas* canvas) { - return compositor_ && compositor_->DemandDrawSw(canvas); + DCHECK(compositor_); + return compositor_->DemandDrawSw(canvas); } } // namespace android_webview diff --git a/android_webview/browser/in_process_view_renderer.h b/android_webview/browser/in_process_view_renderer.h index fc10f3833b..3ec28308f3 100644 --- a/android_webview/browser/in_process_view_renderer.h +++ b/android_webview/browser/in_process_view_renderer.h @@ -46,6 +46,7 @@ class InProcessViewRenderer : public BrowserViewRenderer, virtual void OnVisibilityChanged(bool visible) OVERRIDE; virtual void OnSizeChanged(int width, int height) OVERRIDE; virtual void ScrollTo(gfx::Vector2d new_value) OVERRIDE; + virtual void SetPageScaleFactor(float page_scale_factor) OVERRIDE; virtual void OnAttachedToWindow(int width, int height) OVERRIDE; virtual void OnDetachedFromWindow() OVERRIDE; virtual void SetDipScale(float dip_scale) OVERRIDE; @@ -62,12 +63,13 @@ class InProcessViewRenderer : public BrowserViewRenderer, virtual void SetTotalRootLayerScrollOffset( gfx::Vector2dF new_value_css) OVERRIDE; virtual gfx::Vector2dF GetTotalRootLayerScrollOffset() OVERRIDE; + virtual void DidOverscroll(gfx::Vector2dF accumulated_overscroll, + gfx::Vector2dF current_fling_velocity) OVERRIDE; void WebContentsGone(); private: void EnsureContinuousInvalidation(AwDrawGLInfo* draw_info); - void DoEnsureContinuousInvalidation(AwDrawGLInfo* draw_info); bool DrawSWInternal(jobject java_canvas, const gfx::Rect& clip_bounds); bool CompositeSW(SkCanvas* canvas); @@ -83,6 +85,7 @@ class InProcessViewRenderer : public BrowserViewRenderer, bool visible_; float dip_scale_; + float page_scale_factor_; // When true, we should continuously invalidate and keep drawing, for example // to drive animation. @@ -94,10 +97,6 @@ class InProcessViewRenderer : public BrowserViewRenderer, // Holds a callback to FallbackTickFired while it is pending. base::CancelableClosure fallback_tick_; - // TODO(boliu): Remove these when we are no longer starving native tasks. - bool do_ensure_continuous_invalidation_task_pending_; - base::WeakPtrFactory<InProcessViewRenderer> weak_factory_; - int width_; int height_; @@ -115,6 +114,10 @@ class InProcessViewRenderer : public BrowserViewRenderer, // Current scroll offset in CSS pixels. gfx::Vector2dF scroll_offset_css_; + // Used to convert accumulated-based overscroll updates into delta-based + // updates. + gfx::Vector2dF previous_accumulated_overscroll_; + DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); }; diff --git a/android_webview/browser/net/android_stream_reader_url_request_job.cc b/android_webview/browser/net/android_stream_reader_url_request_job.cc index 0dc659682f..07106d4691 100644 --- a/android_webview/browser/net/android_stream_reader_url_request_job.cc +++ b/android_webview/browser/net/android_stream_reader_url_request_job.cc @@ -13,7 +13,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/lazy_instance.h" -#include "base/message_loop.h" +#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop_proxy.h" #include "base/strings/string_number_conversions.h" #include "base/task_runner.h" diff --git a/android_webview/browser/net/android_stream_reader_url_request_job_unittest.cc b/android_webview/browser/net/android_stream_reader_url_request_job_unittest.cc index a6117c6963..97a310ce94 100644 --- a/android_webview/browser/net/android_stream_reader_url_request_job_unittest.cc +++ b/android_webview/browser/net/android_stream_reader_url_request_job_unittest.cc @@ -7,7 +7,7 @@ #include "android_webview/browser/net/aw_url_request_job_factory.h" #include "android_webview/browser/net/input_stream_reader.h" #include "base/format_macros.h" -#include "base/message_loop.h" +#include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" #include "net/url_request/url_request_job_factory_impl.h" diff --git a/android_webview/browser/net/aw_url_request_context_getter.cc b/android_webview/browser/net/aw_url_request_context_getter.cc index 4028ec7ac6..eed948f0b1 100644 --- a/android_webview/browser/net/aw_url_request_context_getter.cc +++ b/android_webview/browser/net/aw_url_request_context_getter.cc @@ -54,6 +54,22 @@ AwURLRequestContextGetter::~AwURLRequestContextGetter() { void AwURLRequestContextGetter::Init() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + cookie_store_ = content::CreatePersistentCookieStore( + browser_context_->GetPath().Append(FILE_PATH_LITERAL("Cookies")), + true, + NULL, + NULL); + cookie_store_->GetCookieMonster()->SetPersistSessionCookies(true); + + // The CookieMonster must be passed here so it happens synchronously to + // the main thread initialization (to avoid race condition in another + // thread trying to access the CookieManager API). + DidCreateCookieMonster(cookie_store_->GetCookieMonster()); +} + +void AwURLRequestContextGetter::InitAsync() { + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); + net::URLRequestContextBuilder builder; builder.set_user_agent(content::GetUserAgent(GURL())); builder.set_network_delegate(new AwNetworkDelegate()); @@ -84,21 +100,7 @@ void AwURLRequestContextGetter::Init() { BrowserThread::GetMessageLoopProxyForThread(BrowserThread::CACHE))); main_http_factory_.reset(main_cache); url_request_context_->set_http_transaction_factory(main_cache); - - scoped_refptr<net::CookieStore> cookie_store = - content::CreatePersistentCookieStore( - browser_context_->GetPath().Append(FILE_PATH_LITERAL("Cookies")), - false, - NULL, - NULL); - cookie_store->GetCookieMonster()->SetPersistSessionCookies(true); - url_request_context_->set_cookie_store(cookie_store.get()); - - // The CookieMonster must be passed here so it happens synchronously to - // the main thread initialization (to avoid race condition in another - // thread trying to access the CookieManager API). - DidCreateCookieMonster( - url_request_context_->cookie_store()->GetCookieMonster()); + url_request_context_->set_cookie_store(cookie_store_.get()); } void AwURLRequestContextGetter::PopulateNetworkSessionParams( diff --git a/android_webview/browser/net/aw_url_request_context_getter.h b/android_webview/browser/net/aw_url_request_context_getter.h index 418e921f2c..93d59aa0e4 100644 --- a/android_webview/browser/net/aw_url_request_context_getter.h +++ b/android_webview/browser/net/aw_url_request_context_getter.h @@ -35,6 +35,7 @@ class AwURLRequestContextGetter : public net::URLRequestContextGetter, // content::BrowserThreadDelegate implementation. virtual void Init() OVERRIDE; + virtual void InitAsync() OVERRIDE; virtual void CleanUp() OVERRIDE {} // net::URLRequestContextGetter implementation. @@ -58,6 +59,7 @@ class AwURLRequestContextGetter : public net::URLRequestContextGetter, void PopulateNetworkSessionParams(net::HttpNetworkSession::Params* params); AwBrowserContext* browser_context_; // weak + scoped_refptr<net::CookieStore> cookie_store_; scoped_ptr<net::URLRequestContext> url_request_context_; scoped_ptr<net::ProxyConfigService> proxy_config_service_; scoped_ptr<net::URLRequestJobFactory> job_factory_; diff --git a/android_webview/browser/net/input_stream_reader.cc b/android_webview/browser/net/input_stream_reader.cc index f927112b5f..692e75a9cc 100644 --- a/android_webview/browser/net/input_stream_reader.cc +++ b/android_webview/browser/net/input_stream_reader.cc @@ -5,7 +5,7 @@ #include "android_webview/browser/net/input_stream_reader.h" #include "android_webview/browser/input_stream.h" -#include "base/message_loop.h" +#include "base/message_loop/message_loop.h" #include "content/public/browser/browser_thread.h" #include "net/base/net_errors.h" #include "net/http/http_byte_range.h" diff --git a/android_webview/browser/renderer_host/aw_render_view_host_ext.cc b/android_webview/browser/renderer_host/aw_render_view_host_ext.cc index 65641d7b33..46bb312d01 100644 --- a/android_webview/browser/renderer_host/aw_render_view_host_ext.cc +++ b/android_webview/browser/renderer_host/aw_render_view_host_ext.cc @@ -85,7 +85,7 @@ void AwRenderViewHostExt::SetInitialPageScale(double page_scale_factor) { page_scale_factor)); } -void AwRenderViewHostExt::RenderViewGone(base::TerminationStatus status) { +void AwRenderViewHostExt::RenderProcessGone(base::TerminationStatus status) { DCHECK(CalledOnValidThread()); for (std::map<int, DocumentHasImagesResult>::iterator pending_req = pending_document_has_images_requests_.begin(); @@ -140,7 +140,7 @@ void AwRenderViewHostExt::OnUpdateHitTestData( } void AwRenderViewHostExt::OnPageScaleFactorChanged(float page_scale_factor) { - client_->OnPageScaleFactorChanged(page_scale_factor); + client_->OnWebLayoutPageScaleFactorChanged(page_scale_factor); } } // namespace android_webview diff --git a/android_webview/browser/renderer_host/aw_render_view_host_ext.h b/android_webview/browser/renderer_host/aw_render_view_host_ext.h index 24e6a43fed..1f764f8043 100644 --- a/android_webview/browser/renderer_host/aw_render_view_host_ext.h +++ b/android_webview/browser/renderer_host/aw_render_view_host_ext.h @@ -23,7 +23,7 @@ namespace android_webview { class AwRenderViewHostExtClient { public: // Called when the RenderView page scale changes. - virtual void OnPageScaleFactorChanged(float page_scale_factor) = 0; + virtual void OnWebLayoutPageScaleFactorChanged(float page_scale_factor) = 0; protected: virtual ~AwRenderViewHostExtClient() {} @@ -73,7 +73,7 @@ class AwRenderViewHostExt : public content::WebContentsObserver, private: // content::WebContentsObserver implementation. - virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; + virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; virtual void DidNavigateAnyFrame( const content::LoadCommittedDetails& details, const content::FrameNavigateParams& params) OVERRIDE; diff --git a/android_webview/browser/scoped_app_gl_state_restore.cc b/android_webview/browser/scoped_app_gl_state_restore.cc new file mode 100644 index 0000000000..87f888e5f5 --- /dev/null +++ b/android_webview/browser/scoped_app_gl_state_restore.cc @@ -0,0 +1,152 @@ +// Copyright 2013 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. + +#include "android_webview/browser/scoped_app_gl_state_restore.h" + +#include "base/lazy_instance.h" +#include "ui/gl/gl_context.h" +#include "ui/gl/gl_surface_stub.h" + +namespace android_webview { + +namespace { + +// "App" context is a bit of a stretch. Basically we use this context while +// saving and restoring the App GL state. +class AppContextSurface { + public: + AppContextSurface() + : surface(new gfx::GLSurfaceStub), + context(gfx::GLContext::CreateGLContext(NULL, + surface.get(), + gfx::PreferDiscreteGpu)) {} + void MakeCurrent() { context->MakeCurrent(surface.get()); } + + private: + scoped_refptr<gfx::GLSurfaceStub> surface; + scoped_refptr<gfx::GLContext> context; + + DISALLOW_COPY_AND_ASSIGN(AppContextSurface); +}; + +base::LazyInstance<AppContextSurface> g_app_context_surface = + LAZY_INSTANCE_INITIALIZER; + +// Make the global g_app_context_surface current so that the gl_binding is not +// NULL for making gl* calls. The binding can be null if another GlContext was +// destroyed immediately before gl* calls here. +void MakeAppContextCurrent() { + g_app_context_surface.Get().MakeCurrent(); +} + +} // namespace + +ScopedAppGLStateRestore::ScopedAppGLStateRestore() { + MakeAppContextCurrent(); + + // TODO(boliu): These should always be 0 in draw case, but not necessarily in + // OnDetachFromWindow or other cases. When we have guarantee that we are no + // longer making GL calls outside of draw, DCHECK these are 0 in draw case. + glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &vertex_array_buffer_binding_); + glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &index_array_buffer_binding_); + + glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, + &texture_external_oes_binding_); + glGetIntegerv(GL_PACK_ALIGNMENT, &pack_alignment_); + glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpack_alignment_); + + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(vertex_attrib_); ++i) { + glGetVertexAttribiv( + i, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &vertex_attrib_[i].enabled); + glGetVertexAttribiv( + i, GL_VERTEX_ATTRIB_ARRAY_SIZE, &vertex_attrib_[i].size); + glGetVertexAttribiv( + i, GL_VERTEX_ATTRIB_ARRAY_TYPE, &vertex_attrib_[i].type); + glGetVertexAttribiv( + i, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED, &vertex_attrib_[i].normalized); + glGetVertexAttribiv( + i, GL_VERTEX_ATTRIB_ARRAY_STRIDE, &vertex_attrib_[i].stride); + glGetVertexAttribPointerv( + i, GL_VERTEX_ATTRIB_ARRAY_POINTER, &vertex_attrib_[i].pointer); + } + + glGetBooleanv(GL_DEPTH_TEST, &depth_test_); + glGetBooleanv(GL_CULL_FACE, &cull_face_); + glGetBooleanv(GL_COLOR_WRITEMASK, color_mask_); + glGetBooleanv(GL_BLEND, &blend_enabled_); + glGetIntegerv(GL_BLEND_SRC_RGB, &blend_src_rgb_); + glGetIntegerv(GL_BLEND_SRC_ALPHA, &blend_src_alpha_); + glGetIntegerv(GL_BLEND_DST_RGB, &blend_dest_rgb_); + glGetIntegerv(GL_BLEND_DST_ALPHA, &blend_dest_alpha_); + glGetIntegerv(GL_ACTIVE_TEXTURE, &active_texture_); + glGetIntegerv(GL_VIEWPORT, viewport_); + glGetBooleanv(GL_SCISSOR_TEST, &scissor_test_); + glGetIntegerv(GL_SCISSOR_BOX, scissor_box_); + glGetIntegerv(GL_CURRENT_PROGRAM, ¤t_program_); +} + +ScopedAppGLStateRestore::~ScopedAppGLStateRestore() { + MakeAppContextCurrent(); + + glBindBuffer(GL_ARRAY_BUFFER, vertex_array_buffer_binding_); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_array_buffer_binding_); + + glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture_external_oes_binding_); + glPixelStorei(GL_PACK_ALIGNMENT, pack_alignment_); + glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment_); + + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(vertex_attrib_); ++i) { + glVertexAttribPointer(i, + vertex_attrib_[i].size, + vertex_attrib_[i].type, + vertex_attrib_[i].normalized, + vertex_attrib_[i].stride, + vertex_attrib_[i].pointer); + + if (vertex_attrib_[i].enabled) { + glEnableVertexAttribArray(i); + } else { + glDisableVertexAttribArray(i); + } + } + + if (depth_test_) { + glEnable(GL_DEPTH_TEST); + } else { + glDisable(GL_DEPTH_TEST); + } + + if (cull_face_) { + glEnable(GL_CULL_FACE); + } else { + glDisable(GL_CULL_FACE); + } + + glColorMask(color_mask_[0], color_mask_[1], color_mask_[2], color_mask_[3]); + + if (blend_enabled_) { + glEnable(GL_BLEND); + } else { + glDisable(GL_BLEND); + } + + glBlendFuncSeparate( + blend_src_rgb_, blend_dest_rgb_, blend_src_alpha_, blend_dest_alpha_); + glActiveTexture(active_texture_); + + glViewport(viewport_[0], viewport_[1], viewport_[2], viewport_[3]); + + if (scissor_test_) { + glEnable(GL_SCISSOR_TEST); + } else { + glDisable(GL_SCISSOR_TEST); + } + + glScissor( + scissor_box_[0], scissor_box_[1], scissor_box_[2], scissor_box_[3]); + + glUseProgram(current_program_); +} + +} // namespace android_webview diff --git a/android_webview/browser/scoped_app_gl_state_restore.h b/android_webview/browser/scoped_app_gl_state_restore.h new file mode 100644 index 0000000000..a74ffb9e90 --- /dev/null +++ b/android_webview/browser/scoped_app_gl_state_restore.h @@ -0,0 +1,54 @@ +// Copyright 2013 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. + +#include "base/basictypes.h" +#include "ui/gl/gl_bindings.h" + +namespace gfx { +class GLContext; +} + +namespace android_webview { + +// This class is not thread safe and should only be used on the UI thread. +class ScopedAppGLStateRestore { + public: + ScopedAppGLStateRestore(); + ~ScopedAppGLStateRestore(); + + private: + GLint texture_external_oes_binding_; + GLint pack_alignment_; + GLint unpack_alignment_; + + struct { + GLint enabled; + GLint size; + GLint type; + GLint normalized; + GLint stride; + GLvoid* pointer; + } vertex_attrib_[3]; + + GLint vertex_array_buffer_binding_; + GLint index_array_buffer_binding_; + + GLboolean depth_test_; + GLboolean cull_face_; + GLboolean color_mask_[4]; + GLboolean blend_enabled_; + GLint blend_src_rgb_; + GLint blend_src_alpha_; + GLint blend_dest_rgb_; + GLint blend_dest_alpha_; + GLint active_texture_; + GLint viewport_[4]; + GLboolean scissor_test_; + GLint scissor_box_[4]; + GLint current_program_; + + DISALLOW_COPY_AND_ASSIGN(ScopedAppGLStateRestore); +}; + +} // namespace android_webview diff --git a/android_webview/common/aw_hit_test_data.h b/android_webview/common/aw_hit_test_data.h index 14cce60784..d72bcf74b5 100644 --- a/android_webview/common/aw_hit_test_data.h +++ b/android_webview/common/aw_hit_test_data.h @@ -6,7 +6,7 @@ #define ANDROID_WEBVIEW_COMMON_AW_HIT_TEST_DATA_H_ #include "base/strings/string16.h" -#include "googleurl/src/gurl.h" +#include "url/gurl.h" namespace android_webview { diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java index 5f6894c3ca..a3e7dcf70c 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContents.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java @@ -101,6 +101,20 @@ public class AwContents { void onScrollChanged(int lPix, int tPix, int oldlPix, int oldtPix); /** + * @see View#overScrollBy(int, int, int, int, int, int, int, int, boolean); + */ + void overScrollBy(int deltaX, int deltaY, + int scrollX, int scrollY, + int scrollRangeX, int scrollRangeY, + int maxOverScrollX, int maxOverScrollY, + boolean isTouchEvent); + + /** + * @see View#scrollTo(int, int) + */ + void super_scrollTo(int scrollX, int scrollY); + + /** * @see View#setMeasuredDimension(int, int) */ void setMeasuredDimension(int measuredWidth, int measuredHeight); @@ -135,6 +149,7 @@ public class AwContents { private boolean mIsPaused; private boolean mIsVisible; // Equivalent to windowVisible && viewVisible && !mIsPaused. + private boolean mIsAttachedToWindow; private Bitmap mFavicon; private boolean mHasRequestedVisitedHistoryFromClient; // TODO(boliu): This should be in a global context, not per webview. @@ -245,8 +260,24 @@ public class AwContents { @Override public boolean shouldIgnoreNavigation(NavigationParams navigationParams) { final String url = navigationParams.url; + final int transitionType = navigationParams.pageTransitionType; + final boolean isLoadUrl = + (transitionType & PageTransitionTypes.PAGE_TRANSITION_FROM_API) != 0; + final boolean isBackForward = + (transitionType & PageTransitionTypes.PAGE_TRANSITION_FORWARD_BACK) != 0; + final boolean isReload = + (transitionType & PageTransitionTypes.PAGE_TRANSITION_CORE_MASK) == + PageTransitionTypes.PAGE_TRANSITION_RELOAD; + final boolean isRedirect = navigationParams.isRedirect; + boolean ignoreNavigation = false; - if (mLastLoadUrlAddress != null && mLastLoadUrlAddress.equals(url)) { + + // Any navigation from loadUrl, goBack/Forward, or reload, are considered application + // initiated and hence will not yield a shouldOverrideUrlLoading() callback. + // TODO(joth): Using PageTransitionTypes should be sufficient to determine all app + // initiated navigations, and so mLastLoadUrlAddress should be removed. + if ((isLoadUrl && !isRedirect) || isBackForward || isReload || + mLastLoadUrlAddress != null && mLastLoadUrlAddress.equals(url)) { // Support the case where the user clicks on a link that takes them back to the // same page. mLastLoadUrlAddress = null; @@ -293,11 +324,32 @@ public class AwContents { } //-------------------------------------------------------------------------------------------- + // NOTE: This content size change notification comes from the compositor and reflects the size + // of the content on screen (but not neccessarily in the renderer main thread). + private class AwContentUpdateFrameInfoListener + implements ContentViewCore.UpdateFrameInfoListener { + @Override + public void onFrameInfoUpdated(float widthCss, float heightCss, float pageScaleFactor) { + int widthPix = (int) Math.floor(widthCss * mDIPScale * pageScaleFactor); + int heightPix = (int) Math.floor(heightCss * mDIPScale * pageScaleFactor); + mScrollOffsetManager.setContentSize(widthPix, heightPix); + + nativeSetDisplayedPageScaleFactor(mNativeAwContents, pageScaleFactor); + } + } + + //-------------------------------------------------------------------------------------------- private class AwScrollOffsetManagerDelegate implements AwScrollOffsetManager.Delegate { @Override - public boolean scrollContainerViewTo(int x, int y) { - mContainerView.scrollTo(x, y); - return (x == mContainerView.getScrollX() && y == mContainerView.getScrollY()); + public void overScrollContainerViewBy(int deltaX, int deltaY, int scrollX, int scrollY, + int scrollRangeX, int scrollRangeY) { + mInternalAccessAdapter.overScrollBy(deltaX, deltaY, scrollX, scrollY, + scrollRangeX, scrollRangeY, 0, 0, true); + } + + @Override + public void scrollContainerViewTo(int x, int y) { + mInternalAccessAdapter.super_scrollTo(x, y); } @Override @@ -458,6 +510,7 @@ public class AwContents { nativeSetJavaPeers(mNativeAwContents, this, mWebContentsDelegate, mContentsClientBridge, mIoThreadClient, mInterceptNavigationDelegate); mContentsClient.installWebContentsObserver(mContentViewCore); + mContentViewCore.setUpdateFrameInfoListener(new AwContentUpdateFrameInfoListener()); mSettings.setWebContents(nativeWebContents); nativeSetDipScale(mNativeAwContents, (float) mDIPScale); } @@ -484,14 +537,29 @@ public class AwContents { // Recap: supplyContentsForPopup() is called on the parent window's content, this method is // called on the popup window's content. private void receivePopupContents(int popupNativeAwContents) { + // Save existing view state. + final boolean wasAttached = mIsAttachedToWindow; + final boolean wasVisible = getContainerViewVisible(); + final boolean wasPaused = mIsPaused; + final boolean wasFocused = mWindowFocused; + + // Properly clean up existing mContentViewCore and mNativeAwContents. + if (wasFocused) onWindowFocusChanged(false); + if (wasVisible) setVisibilityInternal(false); + // TODO(boliu): This may destroy GL resources outside of functor. + if (wasAttached) onDetachedFromWindow(); + if (!wasPaused) onPause(); + setNewAwContents(popupNativeAwContents); - // Finally refresh view size and visibility, to poke new values into ContentViewCore. + // Finally refresh all view state for mContentViewCore and mNativeAwContents. + if (!wasPaused) onResume(); + if (wasAttached) onAttachedToWindow(); mLastGlobalVisibleWidth = 0; mLastGlobalVisibleHeight = 0; onSizeChanged(mContainerView.getWidth(), mContainerView.getHeight(), 0, 0); - updateVisibilityStateForced(); - onWindowFocusChanged(mWindowFocused); + if (wasVisible) setVisibilityInternal(true); + if (wasFocused) onWindowFocusChanged(true); } public void destroy() { @@ -572,6 +640,8 @@ public class AwContents { public void onDraw(Canvas canvas) { if (mNativeAwContents == 0) return; + mScrollOffsetManager.syncScrollOffsetFromOnDraw(); + canvas.getClipBounds(mClipBoundsTemporary); if (!nativeOnDraw(mNativeAwContents, canvas, canvas.isHardwareAccelerated(), mContainerView.getScrollX(), mContainerView.getScrollY(), @@ -597,11 +667,21 @@ public class AwContents { /** * Called by the embedder when the scroll offset of the containing view has changed. + * @see View#onScrollChanged(int,int) */ public void onContainerViewScrollChanged(int l, int t, int oldl, int oldt) { mScrollOffsetManager.onContainerViewScrollChanged(l, t); } + /** + * Called by the embedder when the containing view is to be scrolled or overscrolled. + * @see View#onOverScrolled(int,int,int,int) + */ + public void onContainerViewOverScrolled(int scrollX, int scrollY, boolean clampedX, + boolean clampedY) { + mScrollOffsetManager.onContainerViewOverScrolled(scrollX, scrollY, clampedX, clampedY); + } + public Picture capturePicture() { return nativeCapturePicture(mNativeAwContents); } @@ -681,6 +761,8 @@ public class AwContents { params.getTransitionType() == PageTransitionTypes.PAGE_TRANSITION_LINK) { params.setTransitionType(PageTransitionTypes.PAGE_TRANSITION_RELOAD); } + params.setTransitionType( + params.getTransitionType() | PageTransitionTypes.PAGE_TRANSITION_FROM_API); // For WebView, always use the user agent override, which is set // every time the user agent in AwSettings is modified. @@ -740,38 +822,38 @@ public class AwContents { } /** - * @see ContentViewCore#computeHorizontalScrollRange() + * @see View#computeHorizontalScrollRange() */ public int computeHorizontalScrollRange() { - return mContentViewCore.computeHorizontalScrollRange(); + return mScrollOffsetManager.computeHorizontalScrollRange(); } /** - * @see ContentViewCore#computeHorizontalScrollOffset() + * @see View#computeHorizontalScrollOffset() */ public int computeHorizontalScrollOffset() { - return mContentViewCore.computeHorizontalScrollOffset(); + return mScrollOffsetManager.computeHorizontalScrollOffset(); } /** - * @see ContentViewCore#computeVerticalScrollRange() + * @see View#computeVerticalScrollRange() */ public int computeVerticalScrollRange() { - return mContentViewCore.computeVerticalScrollRange(); + return mScrollOffsetManager.computeVerticalScrollRange(); } /** - * @see ContentViewCore#computeVerticalScrollOffset() + * @see View#computeVerticalScrollOffset() */ public int computeVerticalScrollOffset() { - return mContentViewCore.computeVerticalScrollOffset(); + return mScrollOffsetManager.computeVerticalScrollOffset(); } /** - * @see ContentViewCore#computeVerticalScrollExtent() + * @see View#computeVerticalScrollExtent() */ public int computeVerticalScrollExtent() { - return mContentViewCore.computeVerticalScrollExtent(); + return mScrollOffsetManager.computeVerticalScrollExtent(); } /** @@ -858,6 +940,7 @@ public class AwContents { public void onPause() { mIsPaused = true; updateVisibilityState(); + mContentViewCore.onActivityPause(); } /** @@ -866,6 +949,9 @@ public class AwContents { public void onResume() { mIsPaused = false; updateVisibilityState(); + // Not calling mContentViewCore.onActivityResume because it is the same + // as onShow, but we do not want to call onShow yet, since AwContents + // visibility depends on other things. TODO(boliu): Clean this up. } /** @@ -1095,6 +1181,23 @@ public class AwContents { mContentViewCore.invokeZoomPicker(); } + /** + * @see ContentViewCore.evaluateJavaScript(String, ContentViewCOre.JavaScriptCallback) + */ + public void evaluateJavaScript(String script, final ValueCallback<String> callback) { + ContentViewCore.JavaScriptCallback jsCallback = null; + if (callback != null) { + jsCallback = new ContentViewCore.JavaScriptCallback() { + @Override + public void handleJavaScriptResult(String jsonResult) { + callback.onReceiveValue(jsonResult); + } + }; + } + + mContentViewCore.evaluateJavaScript(script, jsCallback); + } + //-------------------------------------------------------------------------------------------- // View and ViewGroup method implementations //-------------------------------------------------------------------------------------------- @@ -1141,8 +1244,11 @@ public class AwContents { /** * @see android.view.View#onAttachedToWindow() + * + * Note that this is also called from receivePopupContents. */ public void onAttachedToWindow() { + mIsAttachedToWindow = true; if (mScrollChangeListener == null) { mScrollChangeListener = new ScrollChangeListener(); } @@ -1162,6 +1268,7 @@ public class AwContents { * @see android.view.View#onDetachedFromWindow() */ public void onDetachedFromWindow() { + mIsAttachedToWindow = false; if (mNativeAwContents != 0) { nativeOnDetachedFromWindow(mNativeAwContents); } @@ -1196,6 +1303,7 @@ public class AwContents { */ public void onSizeChanged(int w, int h, int ow, int oh) { if (mNativeAwContents == 0) return; + mScrollOffsetManager.setContainerViewSize(w, h); updatePhysicalBackingSizeIfNeeded(); mContentViewCore.onSizeChanged(w, h, ow, oh); nativeOnSizeChanged(mNativeAwContents, w, h, ow, oh); @@ -1216,21 +1324,23 @@ public class AwContents { } private void updateVisibilityState() { - doUpdateVisibilityState(false); - } + boolean visible = getContainerViewVisible(); + if (mIsVisible == visible) return; - private void updateVisibilityStateForced() { - doUpdateVisibilityState(true); + setVisibilityInternal(visible); } - private void doUpdateVisibilityState(boolean forced) { - if (mNativeAwContents == 0) return; + private boolean getContainerViewVisible() { boolean windowVisible = mContainerView.getWindowVisibility() == View.VISIBLE; boolean viewVisible = mContainerView.getVisibility() == View.VISIBLE; - boolean visible = windowVisible && viewVisible && !mIsPaused; - if (mIsVisible == visible && !forced) return; + return windowVisible && viewVisible && !mIsPaused; + } + private void setVisibilityInternal(boolean visible) { + // Note that this skips mIsVisible check and unconditionally sets + // visibility. In general, callers should use updateVisibilityState + // instead. mIsVisible = visible; if (mIsVisible) { mContentViewCore.onShow(); @@ -1469,9 +1579,9 @@ public class AwContents { } @CalledByNative - private void onPageScaleFactorChanged(float pageScaleFactor) { + private void onWebLayoutPageScaleFactorChanged(float webLayoutPageScaleFactor) { // This change notification comes from the renderer thread, not from the cc/ impl thread. - mLayoutSizer.onPageScaleChanged(pageScaleFactor); + mLayoutSizer.onPageScaleChanged(webLayoutPageScaleFactor); } @CalledByNative @@ -1485,6 +1595,11 @@ public class AwContents { delegate.init(mContentViewCore, mDIPScale); } + @CalledByNative + private void didOverscroll(int deltaX, int deltaY) { + mScrollOffsetManager.overscrollBy(deltaX, deltaY); + } + // ------------------------------------------------------------------------------------------- // Helper methods // ------------------------------------------------------------------------------------------- @@ -1577,6 +1692,8 @@ public class AwContents { private native void nativeOnAttachedToWindow(int nativeAwContents, int w, int h); private native void nativeOnDetachedFromWindow(int nativeAwContents); private native void nativeSetDipScale(int nativeAwContents, float dipScale); + private native void nativeSetDisplayedPageScaleFactor(int nativeAwContents, + float pageScaleFactor); // Returns null if save state fails. private native byte[] nativeGetOpaqueState(int nativeAwContents); diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java index 643e5910dd..41f244624d 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java @@ -25,6 +25,7 @@ import android.webkit.WebChromeClient; import org.chromium.content.browser.ContentVideoView; import org.chromium.content.browser.ContentVideoViewClient; +import org.chromium.content.browser.ContentVideoViewControls; import org.chromium.content.browser.ContentViewClient; import org.chromium.content.browser.ContentViewCore; import org.chromium.content.browser.WebContentsObserverAndroid; @@ -158,6 +159,11 @@ public abstract class AwContentsClient { @Override public void keepScreenOn(boolean screenOn) { } + + @Override + public ContentVideoViewControls createControls() { + return null; + } } final void setDIPScale(double dipScale) { diff --git a/android_webview/java/src/org/chromium/android_webview/AwLayoutSizer.java b/android_webview/java/src/org/chromium/android_webview/AwLayoutSizer.java index 7a48bfe2b1..e09259b0dd 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwLayoutSizer.java +++ b/android_webview/java/src/org/chromium/android_webview/AwLayoutSizer.java @@ -60,6 +60,8 @@ public class AwLayoutSizer { /** * This is used to register the AwLayoutSizer to preferred content size change notifications in * the AwWebContentsDelegate. + * NOTE: The preferred size notifications come in from the Renderer main thread and might be + * out of sync with the content size as seen by the InProcessViewRenderer (and Compositor). */ public AwWebContentsDelegateAdapter.PreferredSizeChangedListener getPreferredSizeChangedListener() { diff --git a/android_webview/java/src/org/chromium/android_webview/AwScrollOffsetManager.java b/android_webview/java/src/org/chromium/android_webview/AwScrollOffsetManager.java index c85b079dd6..9d3daf7722 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwScrollOffsetManager.java +++ b/android_webview/java/src/org/chromium/android_webview/AwScrollOffsetManager.java @@ -6,42 +6,170 @@ package org.chromium.android_webview; import org.chromium.base.CalledByNative; -class AwScrollOffsetManager { - // The unit of all the values in this delegate are physical pixels +/** + * Takes care of syncing the scroll offset between the Android View system and the + * InProcessViewRenderer. + * + * Unless otherwise values (sizes, scroll offsets) are in physical pixels. + */ +public class AwScrollOffsetManager { + // The unit of all the values in this delegate are physical pixels. public interface Delegate { - // Returns whether the update succeeded - boolean scrollContainerViewTo(int x, int y); + // Call View#overScrollBy on the containerView. + void overScrollContainerViewBy(int deltaX, int deltaY, int scrollX, int scrollY, + int scrollRangeX, int scrollRangeY); + // Call View#scrollTo on the containerView. + void scrollContainerViewTo(int x, int y); + // Store the scroll offset in the native side. This should really be a simple store + // operation, the native side shouldn't synchronously alter the scroll offset from within + // this call. void scrollNativeTo(int x, int y); int getContainerViewScrollX(); int getContainerViewScrollY(); } - final Delegate mDelegate; - int mNativeScrollX; - int mNativeScrollY; + private final Delegate mDelegate; + + // Scroll offset as seen by the native side. + private int mNativeScrollX; + private int mNativeScrollY; + + // Content size. + private int mContentWidth; + private int mContentHeight; + + // Size of the container view. + private int mContainerViewWidth; + private int mContainerViewHeight; public AwScrollOffsetManager(Delegate delegate) { mDelegate = delegate; } + //----- Scroll range and extent calculation methods ------------------------------------------- + + public int computeHorizontalScrollRange() { + return Math.max(mContainerViewWidth, mContentWidth); + } + + public int computeMaximumHorizontalScrollOffset() { + return computeHorizontalScrollRange() - mContainerViewWidth; + } + + public int computeHorizontalScrollOffset() { + return mDelegate.getContainerViewScrollX(); + } + + public int computeVerticalScrollRange() { + return Math.max(mContainerViewHeight, mContentHeight); + } + + public int computeMaximumVerticalScrollOffset() { + return computeVerticalScrollRange() - mContainerViewHeight; + } + + public int computeVerticalScrollOffset() { + return mDelegate.getContainerViewScrollY(); + } + + public int computeVerticalScrollExtent() { + return mContainerViewHeight; + } + + //--------------------------------------------------------------------------------------------- + + // Called when the content size changes. This needs to be the size of the on-screen content and + // therefore we can't use the WebContentsDelegate preferred size. + public void setContentSize(int width, int height) { + mContentWidth = width; + mContentHeight = height; + } + + // Called when the physical size of the view changes. + public void setContainerViewSize(int width, int height) { + mContainerViewWidth = width; + mContainerViewHeight = height; + } + + public void syncScrollOffsetFromOnDraw() { + // Unfortunately apps override onScrollChanged without calling super which is why we need + // to sync the scroll offset on every onDraw. + onContainerViewScrollChanged(mDelegate.getContainerViewScrollX(), + mDelegate.getContainerViewScrollY()); + } + + // Called by the native side to attempt to scroll the container view. public void scrollContainerViewTo(int x, int y) { mNativeScrollX = x; mNativeScrollY = y; - if (!mDelegate.scrollContainerViewTo(x, y)) { - scrollNativeTo(mDelegate.getContainerViewScrollX(), - mDelegate.getContainerViewScrollY()); - } + final int scrollX = mDelegate.getContainerViewScrollX(); + final int scrollY = mDelegate.getContainerViewScrollY(); + final int deltaX = x - scrollX; + final int deltaY = y - scrollY; + final int scrollRangeX = computeMaximumHorizontalScrollOffset(); + final int scrollRangeY = computeMaximumVerticalScrollOffset(); + + // We use overScrollContainerViewBy to be compatible with WebViewClassic which used this + // method for handling both over-scroll as well as in-bounds scroll. + mDelegate.overScrollContainerViewBy(deltaX, deltaY, scrollX, scrollY, + scrollRangeX, scrollRangeY); + } + + // Called by the native side to over-scroll the container view. + public void overscrollBy(int deltaX, int deltaY) { + final int scrollX = mDelegate.getContainerViewScrollX(); + final int scrollY = mDelegate.getContainerViewScrollY(); + final int scrollRangeX = computeMaximumHorizontalScrollOffset(); + final int scrollRangeY = computeMaximumVerticalScrollOffset(); + + mDelegate.overScrollContainerViewBy(deltaX, deltaY, scrollX, scrollY, + scrollRangeX, scrollRangeY); + } + + private int clampHorizontalScroll(int scrollX) { + scrollX = Math.max(0, scrollX); + scrollX = Math.min(computeMaximumHorizontalScrollOffset(), scrollX); + return scrollX; + } + + private int clampVerticalScroll(int scrollY) { + scrollY = Math.max(0, scrollY); + scrollY = Math.min(computeMaximumVerticalScrollOffset(), scrollY); + return scrollY; } + // Called by the View system as a response to the mDelegate.overScrollContainerViewBy call. + public void onContainerViewOverScrolled(int scrollX, int scrollY, boolean clampedX, + boolean clampedY) { + // Clamp the scroll offset at (0, max). + scrollX = clampHorizontalScroll(scrollX); + scrollY = clampVerticalScroll(scrollY); + + mDelegate.scrollContainerViewTo(scrollX, scrollY); + // This will only do anything if the containerView scroll offset ends up being different + // than the one set from native in which case we want the value stored on the native side + // to reflect the value stored in the containerView (and not the other way around). + scrollNativeTo(mDelegate.getContainerViewScrollX(), mDelegate.getContainerViewScrollY()); + } + + // Called by the View system when the scroll offset had changed. This might not get called if + // the embedder overrides WebView#onScrollChanged without calling super.onScrollChanged. If + // this method does get called it is called both as a response to the embedder scrolling the + // view as well as a response to mDelegate.scrollContainerViewTo. public void onContainerViewScrollChanged(int x, int y) { scrollNativeTo(x, y); } private void scrollNativeTo(int x, int y) { + x = clampHorizontalScroll(x); + y = clampVerticalScroll(y); + if (x == mNativeScrollX && y == mNativeScrollY) return; + // The scrollNativeTo call should be a simple store, so it's OK to assume it always + // succeeds. mNativeScrollX = x; mNativeScrollY = y; diff --git a/android_webview/javatests/AndroidManifest.xml b/android_webview/javatests/AndroidManifest.xml index e7d3efface..aef384c4b8 100644 --- a/android_webview/javatests/AndroidManifest.xml +++ b/android_webview/javatests/AndroidManifest.xml @@ -7,7 +7,7 @@ <!-- We add an application tag here just so that we can indicate that this package needs to link against the android.test library, which is needed when building test cases. --> - <application> + <application android:hardwareAccelerated="false"> <uses-library android:name="android.test.runner" /> <provider android:name="TestContentProvider" android:authorities="org.chromium.android_webview.test.TestContentProvider" /> diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java index 1f0f177ee7..2666f58982 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java @@ -12,14 +12,15 @@ import android.view.View; import org.chromium.android_webview.AwContents; import org.chromium.android_webview.AwContentsClient; +import org.chromium.android_webview.test.util.AwTestTouchUtils; import org.chromium.android_webview.test.util.CommonResources; import org.chromium.android_webview.test.util.JavascriptEventObserver; import org.chromium.base.test.util.DisabledTest; import org.chromium.base.test.util.Feature; import org.chromium.content.browser.ContentViewCore; import org.chromium.content.browser.test.util.CallbackHelper; -import org.chromium.content.browser.test.util.CallbackHelper; -import org.chromium.content.browser.test.util.TestTouchUtils; +import org.chromium.content.browser.test.util.Criteria; +import org.chromium.content.browser.test.util.CriteriaHelper; import org.chromium.ui.gfx.DeviceDisplayInfo; import java.util.concurrent.atomic.AtomicBoolean; @@ -28,14 +29,36 @@ import java.util.concurrent.atomic.AtomicBoolean; * Integration tests for synchronous scrolling. */ public class AndroidScrollIntegrationTest extends AwTestBase { + private static final int SCROLL_OFFSET_PROPAGATION_TIMEOUT_MS = 6 * 1000; + + private static class OverScrollByCallbackHelper extends CallbackHelper { + int mDeltaX; + int mDeltaY; + + public int getDeltaX() { + assert getCallCount() > 0; + return mDeltaX; + } + + public int getDeltaY() { + assert getCallCount() > 0; + return mDeltaY; + } - public static final int SCROLL_OFFSET_PROPAGATION_TIMEOUT_MS = 6 * 1000; + public void notifyCalled(int deltaX, int deltaY) { + mDeltaX = deltaX; + mDeltaY = deltaY; + notifyCalled(); + } + } private static class ScrollTestContainerView extends AwTestContainerView { private int mMaxScrollXPix = -1; private int mMaxScrollYPix = -1; private CallbackHelper mOnScrollToCallbackHelper = new CallbackHelper(); + private OverScrollByCallbackHelper mOverScrollByCallbackHelper = + new OverScrollByCallbackHelper(); public ScrollTestContainerView(Context context) { super(context); @@ -45,6 +68,10 @@ public class AndroidScrollIntegrationTest extends AwTestBase { return mOnScrollToCallbackHelper; } + public OverScrollByCallbackHelper getOverScrollByCallbackHelper() { + return mOverScrollByCallbackHelper; + } + public void setMaxScrollX(int maxScrollXPix) { mMaxScrollXPix = maxScrollXPix; } @@ -54,6 +81,15 @@ public class AndroidScrollIntegrationTest extends AwTestBase { } @Override + protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, + int scrollRangeX, int scrollRangeY, int maxOverScrollX, int maxOverScrollY, + boolean isTouchEvent) { + mOverScrollByCallbackHelper.notifyCalled(deltaX, deltaY); + return super.overScrollBy(deltaX, deltaY, scrollX, scrollY, + scrollRangeX, scrollRangeY, maxOverScrollX, maxOverScrollY, isTouchEvent); + } + + @Override public void scrollTo(int x, int y) { if (mMaxScrollXPix != -1) x = Math.min(mMaxScrollXPix, x); @@ -74,17 +110,20 @@ public class AndroidScrollIntegrationTest extends AwTestBase { }; } - private String makeTestPage(String onscrollObserver, String firstFrameObserver) { - String headers = - "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"> " + - "<style type=\"text/css\"> " + - " div { " + - " width:1000px; " + - " height:10000px; " + - " background-color: blue; " + - " } " + - "</style> "; - String content = "<div>test div</div> "; + private static final String TEST_PAGE_COMMON_HEADERS = + "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"> " + + "<style type=\"text/css\"> " + + " div { " + + " width:1000px; " + + " height:10000px; " + + " background-color: blue; " + + " } " + + "</style> "; + private static final String TEST_PAGE_COMMON_CONTENT = "<div>test div</div> "; + + private String makeTestPage(String onscrollObserver, String firstFrameObserver, + String extraContent) { + String content = TEST_PAGE_COMMON_CONTENT + extraContent; if (onscrollObserver != null) { content += "<script> " + @@ -108,7 +147,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { " window.requestAnimationFrame(window.onAnimationFrame); " + "</script>"; } - return CommonResources.makeHtmlPageFrom(headers, content); + return CommonResources.makeHtmlPageFrom(TEST_PAGE_COMMON_HEADERS, content); } private void scrollToOnMainSync(final View view, final int xPix, final int yPix) { @@ -155,17 +194,34 @@ public class AndroidScrollIntegrationTest extends AwTestBase { }); } - private void assertScrollInJs(AwContents awContents, TestAwContentsClient contentsClient, - int xCss, int yCss) throws Exception { + private void assertScrollInJs(final AwContents awContents, + final TestAwContentsClient contentsClient, + final int xCss, final int yCss) throws Exception { String x = executeJavaScriptAndWaitForResult(awContents, contentsClient, "window.scrollX"); String y = executeJavaScriptAndWaitForResult(awContents, contentsClient, "window.scrollY"); - assertEquals(Integer.toString(xCss), x); - assertEquals(Integer.toString(yCss), y); + + assertTrue(CriteriaHelper.pollForCriteria(new Criteria() { + @Override + public boolean isSatisfied() { + try { + String x = executeJavaScriptAndWaitForResult(awContents, contentsClient, + "window.scrollX"); + String y = executeJavaScriptAndWaitForResult(awContents, contentsClient, + "window.scrollY"); + return (Integer.toString(xCss).equals(x) && + Integer.toString(yCss).equals(y)); + } catch (Throwable t) { + t.printStackTrace(); + fail("Failed to get window.scroll(X/Y): " + t.toString()); + return false; + } + } + }, WAIT_TIMEOUT_SECONDS * 1000, CHECK_INTERVAL)); } private void loadTestPageAndWaitForFirstFrame(final ScrollTestContainerView testContainerView, final TestAwContentsClient contentsClient, - final String onscrollObserverName) throws Exception { + final String onscrollObserverName, final String extraContent) throws Exception { final JavascriptEventObserver firstFrameObserver = new JavascriptEventObserver(); final String firstFrameObserverName = "firstFrameObserver"; enableJavaScriptOnUiThread(testContainerView.getAwContents()); @@ -178,20 +234,15 @@ public class AndroidScrollIntegrationTest extends AwTestBase { } }); - // After page load the view's scroll offset will be reset back to (0, 0) at least once. We - // set the initial scroll offset to something different so we can observe that. - scrollToOnMainSync(testContainerView, 10, 10); - loadDataSync(testContainerView.getAwContents(), contentsClient.getOnPageFinishedHelper(), - makeTestPage(onscrollObserverName, firstFrameObserverName), "text/html", false); + makeTestPage(onscrollObserverName, firstFrameObserverName, extraContent), + "text/html", false); // We wait for "a couple" of frames for the active tree in CC to stabilize and for pending // tree activations to stop clobbering the root scroll layer's scroll offset. This wait // doesn't strictly guarantee that but there isn't a good alternative and this seems to // work fine. firstFrameObserver.waitForEvent(WAIT_TIMEOUT_SECONDS * 1000); - // This is just to double-check that the animation frame waiting code didn't exit too soon. - assertScrollOnMainSync(testContainerView, 0, 0); } @SmallTest @@ -221,7 +272,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { } }); - loadTestPageAndWaitForFirstFrame(testContainerView, contentsClient, "onscrollObserver"); + loadTestPageAndWaitForFirstFrame(testContainerView, contentsClient, "onscrollObserver", ""); scrollToOnMainSync(testContainerView, targetScrollXPix, targetScrollYPix); @@ -246,7 +297,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { final int targetScrollYPix = (int) Math.round(targetScrollYCss * deviceDIPScale); loadDataSync(testContainerView.getAwContents(), contentsClient.getOnPageFinishedHelper(), - makeTestPage(null, null), "text/html", false); + makeTestPage(null, null, ""), "text/html", false); final CallbackHelper onScrollToCallbackHelper = testContainerView.getOnScrollToCallbackHelper(); @@ -279,7 +330,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { final int maxScrollYPix = (int) Math.round(maxScrollYCss * deviceDIPScale); loadDataSync(testContainerView.getAwContents(), contentsClient.getOnPageFinishedHelper(), - makeTestPage(null, null), "text/html", false); + makeTestPage(null, null, ""), "text/html", false); setMaxScrollOnMainSync(testContainerView, maxScrollXPix, maxScrollYPix); @@ -293,22 +344,8 @@ public class AndroidScrollIntegrationTest extends AwTestBase { assertScrollOnMainSync(testContainerView, maxScrollXPix, maxScrollYPix); } - private void dragViewBy(AwTestContainerView testContainerView, int dxPix, int dyPix, - int steps) { - int gestureStart[] = new int[2]; - testContainerView.getLocationOnScreen(gestureStart); - int gestureEnd[] = new int[] { gestureStart[0] - dxPix, gestureStart[1] - dyPix }; - - TestTouchUtils.drag(this, gestureStart[0], gestureEnd[0], gestureStart[1], gestureEnd[1], - steps); - } - - /* - * http://crbug.com/256774 - * @SmallTest - * @Feature({"AndroidWebView"}) - */ - @DisabledTest + @SmallTest + @Feature({"AndroidWebView"}) public void testTouchScrollCanBeAlteredByUi() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = @@ -334,12 +371,15 @@ public class AndroidScrollIntegrationTest extends AwTestBase { setMaxScrollOnMainSync(testContainerView, maxScrollXPix, maxScrollYPix); - loadTestPageAndWaitForFirstFrame(testContainerView, contentsClient, null); + loadTestPageAndWaitForFirstFrame(testContainerView, contentsClient, null, ""); final CallbackHelper onScrollToCallbackHelper = testContainerView.getOnScrollToCallbackHelper(); final int scrollToCallCount = onScrollToCallbackHelper.getCallCount(); - dragViewBy(testContainerView, targetScrollXPix, targetScrollYPix, dragSteps); + AwTestTouchUtils.dragCompleteView(testContainerView, + 0, -targetScrollXPix, // these need to be negative as we're scrolling down. + 0, -targetScrollYPix, + dragSteps); for (int i = 1; i <= dragSteps; ++i) { onScrollToCallbackHelper.waitForCallback(scrollToCallCount, i); @@ -351,4 +391,121 @@ public class AndroidScrollIntegrationTest extends AwTestBase { assertScrollInJs(testContainerView.getAwContents(), contentsClient, maxScrollXCss, maxScrollYCss); } + + @SmallTest + @Feature({"AndroidWebView"}) + public void testOverScrollX() throws Throwable { + final TestAwContentsClient contentsClient = new TestAwContentsClient(); + final ScrollTestContainerView testContainerView = + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + final OverScrollByCallbackHelper overScrollByCallbackHelper = + testContainerView.getOverScrollByCallbackHelper(); + enableJavaScriptOnUiThread(testContainerView.getAwContents()); + + final int overScrollDeltaX = 30; + final int oneStep = 1; + + loadTestPageAndWaitForFirstFrame(testContainerView, contentsClient, null, ""); + + // Scroll separately in different dimensions because of vertical/horizontal scroll + // snap. + final int overScrollCallCount = overScrollByCallbackHelper.getCallCount(); + AwTestTouchUtils.dragCompleteView(testContainerView, + 0, overScrollDeltaX, + 0, 0, + oneStep); + overScrollByCallbackHelper.waitForCallback(overScrollCallCount); + // Unfortunately the gesture detector seems to 'eat' some number of pixels. For now + // checking that the value is < 0 (overscroll is reported as negative values) will have to + // do. + assertTrue(0 > overScrollByCallbackHelper.getDeltaX()); + assertEquals(0, overScrollByCallbackHelper.getDeltaY()); + + assertScrollOnMainSync(testContainerView, 0, 0); + } + + @SmallTest + @Feature({"AndroidWebView"}) + public void testOverScrollY() throws Throwable { + final TestAwContentsClient contentsClient = new TestAwContentsClient(); + final ScrollTestContainerView testContainerView = + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + final OverScrollByCallbackHelper overScrollByCallbackHelper = + testContainerView.getOverScrollByCallbackHelper(); + enableJavaScriptOnUiThread(testContainerView.getAwContents()); + + final int overScrollDeltaY = 30; + final int oneStep = 1; + + loadTestPageAndWaitForFirstFrame(testContainerView, contentsClient, null, ""); + + int overScrollCallCount = overScrollByCallbackHelper.getCallCount(); + AwTestTouchUtils.dragCompleteView(testContainerView, + 0, 0, + 0, overScrollDeltaY, + oneStep); + overScrollByCallbackHelper.waitForCallback(overScrollCallCount); + assertEquals(0, overScrollByCallbackHelper.getDeltaX()); + assertTrue(0 > overScrollByCallbackHelper.getDeltaY()); + + assertScrollOnMainSync(testContainerView, 0, 0); + } + + @SmallTest + @Feature({"AndroidWebView"}) + public void testScrollToBottomAtPageScaleX0dot5() throws Throwable { + // The idea behind this test is to check that scrolling to the bottom on ther renderer side + // results in the view also reporting as being scrolled to the bottom. + final TestAwContentsClient contentsClient = new TestAwContentsClient(); + final ScrollTestContainerView testContainerView = + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + enableJavaScriptOnUiThread(testContainerView.getAwContents()); + + final int targetScrollXCss = 1000; + final int targetScrollYCss = 10000; + + final String pageHeaders = + "<meta name=\"viewport\" content=\"width=device-width, initial-scale=0.6\"> " + + "<style type=\"text/css\"> " + + " div { " + + " width:1000px; " + + " height:10000px; " + + " background-color: blue; " + + " } " + + " body { " + + " margin: 0px; " + + " padding: 0px; " + + " } " + + "</style> "; + + loadDataSync(testContainerView.getAwContents(), contentsClient.getOnPageFinishedHelper(), + CommonResources.makeHtmlPageFrom(pageHeaders, TEST_PAGE_COMMON_CONTENT), + "text/html", false); + + final double deviceDIPScale = + DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); + + final CallbackHelper onScrollToCallbackHelper = + testContainerView.getOnScrollToCallbackHelper(); + final int scrollToCallCount = onScrollToCallbackHelper.getCallCount(); + executeJavaScriptAndWaitForResult(testContainerView.getAwContents(), contentsClient, + "window.scrollTo(" + targetScrollXCss + "," + targetScrollYCss + ")"); + onScrollToCallbackHelper.waitForCallback(scrollToCallCount); + + getInstrumentation().runOnMainSync(new Runnable() { + @Override + public void run() { + AwContents awContents = testContainerView.getAwContents(); + int maxHorizontal = awContents.computeHorizontalScrollRange() - + testContainerView.getWidth(); + int maxVertical = awContents.computeVerticalScrollRange() - + testContainerView.getHeight(); + // Due to rounding going from CSS -> physical pixels it is possible that more than + // one physical pixels corespond to one CSS pixel, which is why we can't do a + // simple equality test here. + assertTrue(maxHorizontal - awContents.computeHorizontalScrollOffset() < 3); + assertTrue(maxVertical - awContents.computeVerticalScrollOffset() < 3); + } + }); + } } diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java index 4a1d2fe531..09d9cbecda 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java @@ -16,6 +16,7 @@ import org.chromium.android_webview.test.util.CommonResources; import org.chromium.android_webview.test.util.JSUtils; import org.chromium.base.test.util.Feature; import org.chromium.content.browser.NavigationHistory; +import org.chromium.content.browser.LoadUrlParams; import org.chromium.content.browser.test.util.CallbackHelper; import org.chromium.content.browser.test.util.Criteria; import org.chromium.content.browser.test.util.CriteriaHelper; @@ -28,6 +29,7 @@ import java.net.URLEncoder; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; +import java.util.concurrent.TimeUnit; /** * Tests for the WebViewClient.shouldOverrideUrlLoading() method. @@ -783,4 +785,32 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { getHtmlForPageWithJsRedirectTo(redirectTargetUrl, "Replace", 100)); doTestCalledOnRedirect(mWebServer, redirectUrl, redirectTargetUrl); } + + @SmallTest + @Feature({"AndroidWebView", "Navigation"}) + public void testDoubleNavigateDoesNotSuppressInitialNavigate() throws Throwable { + final String jsUrl = "javascript:try{console.log('processed js loadUrl');}catch(e){};"; + final TestAwContentsClient contentsClient = new TestAwContentsClient(); + final AwTestContainerView testContainerView = + createAwTestContainerViewOnMainSync(contentsClient); + final AwContents awContents = testContainerView.getAwContents(); + TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = + contentsClient.getShouldOverrideUrlLoadingHelper(); + + // Do a double navigagtion, the second being an effective no-op, in quick succession (i.e. + // without yielding the main thread inbetween). + int currentCallCount = contentsClient.getOnPageFinishedHelper().getCallCount(); + getInstrumentation().runOnMainSync(new Runnable() { + @Override + public void run() { + awContents.loadUrl(LoadUrlParams.createLoadDataParams( + getHtmlForPageWithSimpleLinkTo(DATA_URL), "text/html", false)); + awContents.loadUrl(new LoadUrlParams(jsUrl)); + } + }); + contentsClient.getOnPageFinishedHelper().waitForCallback(currentCallCount, 1, + WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS); + + assertEquals(0, shouldOverrideUrlLoadingHelper.getCallCount()); + } } diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwQuotaManagerBridgeTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwQuotaManagerBridgeTest.java index 8b356f9121..c7f2cc1753 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwQuotaManagerBridgeTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwQuotaManagerBridgeTest.java @@ -11,6 +11,7 @@ import android.webkit.ValueCallback; import org.chromium.android_webview.AwContents; import org.chromium.android_webview.AwQuotaManagerBridge; import org.chromium.android_webview.AwSettings; +import org.chromium.android_webview.test.util.AwQuotaManagerBridgeTestUtil; import org.chromium.base.test.util.Feature; import org.chromium.content.browser.test.util.CallbackHelper; import org.chromium.content.browser.test.util.Criteria; @@ -53,17 +54,9 @@ public class AwQuotaManagerBridgeTest extends AwTestBase { super.tearDown(); } - private AwQuotaManagerBridge getQuotaManagerBridge() throws Exception { - return runTestOnUiThreadAndGetResult(new Callable<AwQuotaManagerBridge>() { - @Override - public AwQuotaManagerBridge call() throws Exception { - return AwQuotaManagerBridge.getInstance(); - } - }); - } - private void deleteAllData() throws Exception { - final AwQuotaManagerBridge bridge = getQuotaManagerBridge(); + final AwQuotaManagerBridge bridge = + AwQuotaManagerBridgeTestUtil.getQuotaManagerBridge(this); getInstrumentation().runOnMainSync(new Runnable() { @Override public void run() { @@ -73,7 +66,8 @@ public class AwQuotaManagerBridgeTest extends AwTestBase { } private void deleteOrigin(final String origin) throws Exception { - final AwQuotaManagerBridge bridge = getQuotaManagerBridge(); + final AwQuotaManagerBridge bridge = + AwQuotaManagerBridgeTestUtil.getQuotaManagerBridge(this); getInstrumentation().runOnMainSync(new Runnable() { @Override public void run() { @@ -82,43 +76,6 @@ public class AwQuotaManagerBridgeTest extends AwTestBase { }); } - private static class GetOriginsCallbackHelper extends CallbackHelper { - private AwQuotaManagerBridge.Origins mOrigins; - - public void notifyCalled(AwQuotaManagerBridge.Origins origins) { - mOrigins = origins; - notifyCalled(); - } - - public AwQuotaManagerBridge.Origins getOrigins() { - assert getCallCount() > 0; - return mOrigins; - } - } - - private AwQuotaManagerBridge.Origins getOrigins() throws Exception { - final GetOriginsCallbackHelper callbackHelper = new GetOriginsCallbackHelper(); - final AwQuotaManagerBridge bridge = getQuotaManagerBridge(); - - int callCount = callbackHelper.getCallCount(); - getInstrumentation().runOnMainSync(new Runnable() { - @Override - public void run() { - bridge.getOrigins( - new ValueCallback<AwQuotaManagerBridge.Origins>() { - @Override - public void onReceiveValue(AwQuotaManagerBridge.Origins origins) { - callbackHelper.notifyCalled(origins); - } - } - ); - } - }); - callbackHelper.waitForCallback(callCount); - - return callbackHelper.getOrigins(); - } - private static class LongValueCallbackHelper extends CallbackHelper { private long mValue; @@ -135,7 +92,8 @@ public class AwQuotaManagerBridgeTest extends AwTestBase { private long getQuotaForOrigin(final String origin) throws Exception { final LongValueCallbackHelper callbackHelper = new LongValueCallbackHelper(); - final AwQuotaManagerBridge bridge = getQuotaManagerBridge(); + final AwQuotaManagerBridge bridge = + AwQuotaManagerBridgeTestUtil.getQuotaManagerBridge(this); int callCount = callbackHelper.getCallCount(); getInstrumentation().runOnMainSync(new Runnable() { @@ -158,7 +116,8 @@ public class AwQuotaManagerBridgeTest extends AwTestBase { private long getUsageForOrigin(final String origin) throws Exception { final LongValueCallbackHelper callbackHelper = new LongValueCallbackHelper(); - final AwQuotaManagerBridge bridge = getQuotaManagerBridge(); + final AwQuotaManagerBridge bridge = + AwQuotaManagerBridgeTestUtil.getQuotaManagerBridge(this); int callCount = callbackHelper.getCallCount(); getInstrumentation().runOnMainSync(new Runnable() { @@ -271,14 +230,15 @@ public class AwQuotaManagerBridgeTest extends AwTestBase { @Override public boolean isSatisfied() { try { - return getOrigins().mOrigins.length > 0; + return AwQuotaManagerBridgeTestUtil.getOrigins( + AwQuotaManagerBridgeTest.this).mOrigins.length > 0; } catch (Exception e) { return false; } } }); - AwQuotaManagerBridge.Origins origins = getOrigins(); + AwQuotaManagerBridge.Origins origins = AwQuotaManagerBridgeTestUtil.getOrigins(this); assertEquals(origins.mOrigins.length, origins.mUsages.length); assertEquals(origins.mOrigins.length, origins.mQuotas.length); diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwScrollOffsetManagerTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwScrollOffsetManagerTest.java new file mode 100644 index 0000000000..b29d6063e7 --- /dev/null +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwScrollOffsetManagerTest.java @@ -0,0 +1,278 @@ +// Copyright 2013 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. + +package org.chromium.android_webview.test; + +import android.view.View; +import android.view.View.MeasureSpec; +import android.test.InstrumentationTestCase; +import android.test.suitebuilder.annotation.SmallTest; + +import org.chromium.android_webview.AwScrollOffsetManager; + +public class AwScrollOffsetManagerTest extends InstrumentationTestCase { + private static class TestScrollOffsetManagerDelegate implements AwScrollOffsetManager.Delegate { + private int mOverScrollDeltaX; + private int mOverScrollDeltaY; + private int mOverScrollCallCount; + private int mScrollX; + private int mScrollY; + private int mNativeScrollX; + private int mNativeScrollY; + + public int getOverScrollDeltaX() { + return mOverScrollDeltaX; + } + + public int getOverScrollDeltaY() { + return mOverScrollDeltaY; + } + + public int getOverScrollCallCount() { + return mOverScrollCallCount; + } + + public int getScrollX() { + return mScrollX; + } + + public int getScrollY() { + return mScrollY; + } + + public int getNativeScrollX() { + return mNativeScrollX; + } + + public int getNativeScrollY() { + return mNativeScrollY; + } + + @Override + public void overScrollContainerViewBy(int deltaX, int deltaY, int scrollX, int scrollY, + int scrollRangeX, int scrollRangeY) { + mOverScrollDeltaX = deltaX; + mOverScrollDeltaY = deltaY; + mOverScrollCallCount += 1; + } + + @Override + public void scrollContainerViewTo(int x, int y) { + mScrollX = x; + mScrollY = y; + } + + @Override + public void scrollNativeTo(int x, int y) { + mNativeScrollX = x; + mNativeScrollY = y; + } + + @Override + public int getContainerViewScrollX() { + return mScrollX; + } + + @Override + public int getContainerViewScrollY() { + return mScrollY; + } + } + + private void simulateScrolling(AwScrollOffsetManager offsetManager, + TestScrollOffsetManagerDelegate delegate, int scrollX, int scrollY) { + // Scrolling is a two-phase action. First we ask the manager to scroll + int callCount = delegate.getOverScrollCallCount(); + offsetManager.scrollContainerViewTo(scrollX, scrollY); + // The manager then asks the delegate to overscroll the view. + assertEquals(callCount + 1, delegate.getOverScrollCallCount()); + assertEquals(scrollX, delegate.getOverScrollDeltaX() + delegate.getScrollX()); + assertEquals(scrollY, delegate.getOverScrollDeltaY() + delegate.getScrollY()); + // As a response to that the menager expects the view to call back with the new scroll. + offsetManager.onContainerViewOverScrolled(scrollX, scrollY, false, false); + } + + public void testWhenContentSizeMatchesView() { + TestScrollOffsetManagerDelegate delegate = new TestScrollOffsetManagerDelegate(); + AwScrollOffsetManager offsetManager = new AwScrollOffsetManager(delegate); + + final int width = 132; + final int height = 212; + final int scrollX = 11; + final int scrollY = 13; + + offsetManager.setContentSize(width, height); + offsetManager.setContainerViewSize(width, height); + + assertEquals(width, offsetManager.computeHorizontalScrollRange()); + assertEquals(height, offsetManager.computeVerticalScrollRange()); + + // Since the view size and contents size are equal no scrolling should be possible. + assertEquals(0, offsetManager.computeMaximumHorizontalScrollOffset()); + assertEquals(0, offsetManager.computeMaximumVerticalScrollOffset()); + + // Scrolling should generate overscroll but not update the scroll offset. + simulateScrolling(offsetManager, delegate, scrollX, scrollY); + assertEquals(scrollX, delegate.getOverScrollDeltaX()); + assertEquals(scrollY, delegate.getOverScrollDeltaY()); + assertEquals(0, delegate.getScrollX()); + assertEquals(0, delegate.getScrollY()); + assertEquals(0, delegate.getNativeScrollX()); + assertEquals(0, delegate.getNativeScrollY()); + + // Scrolling to 0,0 should result in no deltas. + simulateScrolling(offsetManager, delegate, 0, 0); + assertEquals(0, delegate.getOverScrollDeltaX()); + assertEquals(0, delegate.getOverScrollDeltaY()); + + // Negative scrolling should result in negative deltas but no scroll offset update. + simulateScrolling(offsetManager, delegate, -scrollX, -scrollY); + assertEquals(-scrollX, delegate.getOverScrollDeltaX()); + assertEquals(-scrollY, delegate.getOverScrollDeltaY()); + assertEquals(0, delegate.getScrollX()); + assertEquals(0, delegate.getScrollY()); + assertEquals(0, delegate.getNativeScrollX()); + assertEquals(0, delegate.getNativeScrollY()); + } + + private static final int VIEW_WIDTH = 211; + private static final int VIEW_HEIGHT = 312; + private static final int MAX_HORIZONTAL_OFFSET = 61; + private static final int MAX_VERTICAL_OFFSET = 42; + private static final int CONTENT_WIDTH = VIEW_WIDTH + MAX_HORIZONTAL_OFFSET; + private static final int CONTENT_HEIGHT = VIEW_HEIGHT + MAX_VERTICAL_OFFSET; + + public void testScrollRangeAndMaxOffset() { + TestScrollOffsetManagerDelegate delegate = new TestScrollOffsetManagerDelegate(); + AwScrollOffsetManager offsetManager = new AwScrollOffsetManager(delegate); + + offsetManager.setContentSize(CONTENT_WIDTH, CONTENT_HEIGHT); + offsetManager.setContainerViewSize(VIEW_WIDTH, VIEW_HEIGHT); + + assertEquals(CONTENT_WIDTH, offsetManager.computeHorizontalScrollRange()); + assertEquals(CONTENT_HEIGHT, offsetManager.computeVerticalScrollRange()); + + assertEquals(MAX_HORIZONTAL_OFFSET, offsetManager.computeMaximumHorizontalScrollOffset()); + assertEquals(MAX_VERTICAL_OFFSET, offsetManager.computeMaximumVerticalScrollOffset()); + + // Scrolling beyond the maximum should be clamped. + final int scrollX = MAX_HORIZONTAL_OFFSET + 10; + final int scrollY = MAX_VERTICAL_OFFSET + 11; + + simulateScrolling(offsetManager, delegate, scrollX, scrollY); + assertEquals(scrollX, delegate.getOverScrollDeltaX()); + assertEquals(scrollY, delegate.getOverScrollDeltaY()); + assertEquals(MAX_HORIZONTAL_OFFSET, delegate.getScrollX()); + assertEquals(MAX_VERTICAL_OFFSET, delegate.getScrollY()); + assertEquals(MAX_HORIZONTAL_OFFSET, delegate.getNativeScrollX()); + assertEquals(MAX_VERTICAL_OFFSET, delegate.getNativeScrollY()); + + // Scrolling to negative coordinates should be clamped back to 0,0. + simulateScrolling(offsetManager, delegate, -scrollX, -scrollY); + assertEquals(0, delegate.getScrollX()); + assertEquals(0, delegate.getScrollY()); + assertEquals(0, delegate.getNativeScrollX()); + assertEquals(0, delegate.getNativeScrollY()); + + // The onScrollChanged method is callable by third party code and should also be clamped + offsetManager.onContainerViewScrollChanged(scrollX, scrollY); + assertEquals(MAX_HORIZONTAL_OFFSET, delegate.getNativeScrollX()); + assertEquals(MAX_VERTICAL_OFFSET, delegate.getNativeScrollY()); + + offsetManager.onContainerViewScrollChanged(-scrollX, -scrollY); + assertEquals(0, delegate.getNativeScrollX()); + assertEquals(0, delegate.getNativeScrollY()); + } + + public void testDelegateCanOverrideScroll() { + final int overrideScrollX = 10; + final int overrideScrollY = 10; + + TestScrollOffsetManagerDelegate delegate = new TestScrollOffsetManagerDelegate() { + @Override + public int getContainerViewScrollX() { + return overrideScrollX; + } + + @Override + public int getContainerViewScrollY() { + return overrideScrollY; + } + }; + AwScrollOffsetManager offsetManager = new AwScrollOffsetManager(delegate); + + offsetManager.setContentSize(CONTENT_WIDTH, CONTENT_HEIGHT); + offsetManager.setContainerViewSize(VIEW_WIDTH, VIEW_HEIGHT); + + offsetManager.onContainerViewOverScrolled(0, 0, false, false); + assertEquals(overrideScrollX, delegate.getNativeScrollX()); + assertEquals(overrideScrollY, delegate.getNativeScrollY()); + } + + public void testDelegateOverridenScrollsDontExceedBounds() { + final int overrideScrollX = 222; + final int overrideScrollY = 333; + TestScrollOffsetManagerDelegate delegate = new TestScrollOffsetManagerDelegate() { + @Override + public int getContainerViewScrollX() { + return overrideScrollX; + } + + @Override + public int getContainerViewScrollY() { + return overrideScrollY; + } + }; + AwScrollOffsetManager offsetManager = new AwScrollOffsetManager(delegate); + + offsetManager.setContentSize(CONTENT_WIDTH, CONTENT_HEIGHT); + offsetManager.setContainerViewSize(VIEW_WIDTH, VIEW_HEIGHT); + + offsetManager.onContainerViewOverScrolled(0, 0, false, false); + assertEquals(MAX_HORIZONTAL_OFFSET, delegate.getNativeScrollX()); + assertEquals(MAX_VERTICAL_OFFSET, delegate.getNativeScrollY()); + } + + public void testScrollContainerViewTo() { + TestScrollOffsetManagerDelegate delegate = new TestScrollOffsetManagerDelegate(); + AwScrollOffsetManager offsetManager = new AwScrollOffsetManager(delegate); + + final int scrollX = 31; + final int scrollY = 41; + + offsetManager.setContentSize(CONTENT_WIDTH, CONTENT_HEIGHT); + offsetManager.setContainerViewSize(VIEW_WIDTH, VIEW_HEIGHT); + + assertEquals(0, delegate.getOverScrollDeltaX()); + assertEquals(0, delegate.getOverScrollDeltaY()); + int callCount = delegate.getOverScrollCallCount(); + + offsetManager.scrollContainerViewTo(scrollX, scrollY); + assertEquals(callCount + 1, delegate.getOverScrollCallCount()); + assertEquals(scrollX, delegate.getOverScrollDeltaX()); + assertEquals(scrollY, delegate.getOverScrollDeltaY()); + } + + public void testOnContainerViewOverScrolled() { + TestScrollOffsetManagerDelegate delegate = new TestScrollOffsetManagerDelegate(); + AwScrollOffsetManager offsetManager = new AwScrollOffsetManager(delegate); + + final int scrollX = 31; + final int scrollY = 41; + + offsetManager.setContentSize(CONTENT_WIDTH, CONTENT_HEIGHT); + offsetManager.setContainerViewSize(VIEW_WIDTH, VIEW_HEIGHT); + + assertEquals(0, delegate.getScrollX()); + assertEquals(0, delegate.getScrollY()); + assertEquals(0, delegate.getNativeScrollX()); + assertEquals(0, delegate.getNativeScrollY()); + + offsetManager.onContainerViewOverScrolled(scrollX, scrollY, false, false); + assertEquals(scrollX, delegate.getScrollX()); + assertEquals(scrollY, delegate.getScrollY()); + assertEquals(scrollX, delegate.getNativeScrollX()); + assertEquals(scrollY, delegate.getNativeScrollY()); + } +} diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java index c44532418b..3732649154 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java @@ -5,6 +5,7 @@ package org.chromium.android_webview.test; import android.content.Context; +import android.graphics.Point; import android.os.Build; import android.os.SystemClock; import android.test.suitebuilder.annotation.LargeTest; @@ -12,6 +13,7 @@ import android.test.suitebuilder.annotation.MediumTest; import android.test.suitebuilder.annotation.SmallTest; import android.util.Pair; import android.view.MotionEvent; +import android.view.WindowManager; import android.webkit.WebSettings; import org.apache.http.Header; @@ -2346,12 +2348,8 @@ public class AwSettingsTest extends AwTestBase { views.getContents1(), views.getClient1(), true)); } - /* @SmallTest @Feature({"AndroidWebView", "Preferences"}) - This is triggering a DCHECK on Nexus 7. See crbug.com/230186. - */ - @DisabledTest public void testSetInitialScale() throws Throwable { final TestAwContentsClient contentClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = @@ -2360,9 +2358,16 @@ public class AwSettingsTest extends AwTestBase { final AwSettings awSettings = getAwSettingsOnUiThread(awContents); CallbackHelper onPageFinishedHelper = contentClient.getOnPageFinishedHelper(); + WindowManager wm = (WindowManager) getInstrumentation().getTargetContext() + .getSystemService(Context.WINDOW_SERVICE); + Point screenSize = new Point(); + wm.getDefaultDisplay().getSize(screenSize); + // Make sure after 50% scale, page width still larger than screen. + int height = screenSize.y * 2 + 1; + int width = screenSize.x * 2 + 1; final String page = "<html><body>" + - "<p style='height:1000px;width:1000px'>testSetInitialScale</p>" + - "</body></html>"; + "<p style='height:"+ height + "px;width:" + width + "px'>" + + "testSetInitialScale</p></body></html>"; final float defaultScale = getInstrumentation().getTargetContext().getResources().getDisplayMetrics().density; diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java index da078d272d..0bb148e932 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java @@ -32,8 +32,8 @@ import java.util.concurrent.atomic.AtomicReference; */ public class AwTestBase extends ActivityInstrumentationTestCase2<AwTestRunnerActivity> { - protected final static int WAIT_TIMEOUT_SECONDS = 15; - private static final int CHECK_INTERVAL = 100; + protected static final int WAIT_TIMEOUT_SECONDS = 15; + protected static final int CHECK_INTERVAL = 100; public AwTestBase() { super(AwTestRunnerActivity.class); diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/StandaloneAwQuotaManagerBridgeTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/StandaloneAwQuotaManagerBridgeTest.java new file mode 100644 index 0000000000..43b75bf1db --- /dev/null +++ b/android_webview/javatests/src/org/chromium/android_webview/test/StandaloneAwQuotaManagerBridgeTest.java @@ -0,0 +1,22 @@ +// Copyright 2013 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. + +package org.chromium.android_webview.test; + +import org.chromium.android_webview.AwContents; +import org.chromium.android_webview.AwQuotaManagerBridge; +import org.chromium.android_webview.test.util.AwQuotaManagerBridgeTestUtil; + +/** + * This class tests AwQuotaManagerBridge runs without AwContents etc. It simulates + * use case that user calls WebStorage getInstance() without WebView. + */ +public class StandaloneAwQuotaManagerBridgeTest extends AwTestBase { + public void testStartup() throws Exception { + // AwQuotaManager should run without any issue. + AwQuotaManagerBridge.Origins origins = AwQuotaManagerBridgeTestUtil.getOrigins(this); + assertEquals(origins.mOrigins.length, 0); + assertEquals(AwContents.getNativeInstanceCount(), 0); + } +} diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/util/AwQuotaManagerBridgeTestUtil.java b/android_webview/javatests/src/org/chromium/android_webview/test/util/AwQuotaManagerBridgeTestUtil.java new file mode 100644 index 0000000000..6d0782dd0c --- /dev/null +++ b/android_webview/javatests/src/org/chromium/android_webview/test/util/AwQuotaManagerBridgeTestUtil.java @@ -0,0 +1,68 @@ +// Copyright 2013 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. + +package org.chromium.android_webview.test.util; + +import android.webkit.ValueCallback; + +import org.chromium.android_webview.AwQuotaManagerBridge; +import org.chromium.android_webview.test.AwTestBase; +import org.chromium.content.browser.test.util.CallbackHelper; + +import java.util.concurrent.Callable; + +/** + * This class provides common methods for AwQuotaManagerBridge related tests + */ +public class AwQuotaManagerBridgeTestUtil { + + public static AwQuotaManagerBridge getQuotaManagerBridge(AwTestBase awTestBase) + throws Exception { + return awTestBase.runTestOnUiThreadAndGetResult(new Callable<AwQuotaManagerBridge>() { + @Override + public AwQuotaManagerBridge call() throws Exception { + return AwQuotaManagerBridge.getInstance(); + } + }); + } + + private static class GetOriginsCallbackHelper extends CallbackHelper { + private AwQuotaManagerBridge.Origins mOrigins; + + public void notifyCalled(AwQuotaManagerBridge.Origins origins) { + mOrigins = origins; + notifyCalled(); + } + + public AwQuotaManagerBridge.Origins getOrigins() { + assert getCallCount() > 0; + return mOrigins; + } + } + + public static AwQuotaManagerBridge.Origins getOrigins(AwTestBase awTestBase) + throws Exception { + final GetOriginsCallbackHelper callbackHelper = new GetOriginsCallbackHelper(); + final AwQuotaManagerBridge bridge = getQuotaManagerBridge(awTestBase); + + int callCount = callbackHelper.getCallCount(); + awTestBase.getInstrumentation().runOnMainSync(new Runnable() { + @Override + public void run() { + bridge.getOrigins( + new ValueCallback<AwQuotaManagerBridge.Origins>() { + @Override + public void onReceiveValue(AwQuotaManagerBridge.Origins origins) { + callbackHelper.notifyCalled(origins); + } + } + ); + } + }); + callbackHelper.waitForCallback(callCount); + + return callbackHelper.getOrigins(); + } + +} diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/util/AwTestTouchUtils.java b/android_webview/javatests/src/org/chromium/android_webview/test/util/AwTestTouchUtils.java new file mode 100644 index 0000000000..79e257d6a9 --- /dev/null +++ b/android_webview/javatests/src/org/chromium/android_webview/test/util/AwTestTouchUtils.java @@ -0,0 +1,75 @@ +// Copyright 2013 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. + +package org.chromium.android_webview.test.util; + +import android.app.Activity; +import android.os.SystemClock; +import android.view.MotionEvent; +import android.view.View; +import android.view.ViewConfiguration; + +/** + * A touch utility class that injects the events directly into the view. + * TODO(mkosiba): Merge with TestTouchUtils. + * + * This is similar to TestTouchUtils but injects the events directly into the view class rather + * than going through Instrumentation. This is so that we can avoid the INJECT_PERMISSIONS + * exception when a modal dialog pops over the test activity. + */ +public class AwTestTouchUtils { + private static void sendAction(View view, int action, long downTime, float x, float y) { + long eventTime = SystemClock.uptimeMillis(); + MotionEvent event = MotionEvent.obtain(downTime, eventTime, action, x, y, 0); + view.onTouchEvent(event); + } + + private static long dragStart(View view, float x, float y) { + long downTime = SystemClock.uptimeMillis(); + sendAction(view, MotionEvent.ACTION_DOWN, downTime, x, y); + return downTime; + } + + private static void dragTo(View view, float fromX, float toX, float fromY, + float toY, int stepCount, long downTime) { + float x = fromX; + float y = fromY; + float yStep = (toY - fromY) / stepCount; + float xStep = (toX - fromX) / stepCount; + for (int i = 0; i < stepCount; ++i) { + y += yStep; + x += xStep; + sendAction(view, MotionEvent.ACTION_MOVE, downTime, x, y); + } + } + + private static void dragEnd(View view, float x, float y, long downTime) { + sendAction(view, MotionEvent.ACTION_UP, downTime, x, y); + } + + /** + * Performs a drag between the given coordinates, specified relative to the given view. + * This is safe to call from the instrumentation thread and will invoke the drag + * asynchronously. + * + * @param view The view the coordinates are relative to. + * @param fromX The relative x-coordinate of the start point of the drag. + * @param toX The relative x-coordinate of the end point of the drag. + * @param fromY The relative y-coordinate of the start point of the drag. + * @param toY The relative y-coordinate of the end point of the drag. + * @param stepCount The total number of motion events that should be generated during the drag. + */ + public static void dragCompleteView(final View view, final int fromX, final int toX, + final int fromY, final int toY, final int stepCount) { + view.post(new Runnable() { + @Override + public void run() { + long downTime = dragStart(view, fromX, fromY); + dragTo(view, fromX, toX, fromY, toY, stepCount, downTime); + dragEnd(view, toX, toY, downTime); + } + }); + } +} + diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc index 476f70511e..aeef23c75e 100644 --- a/android_webview/lib/main/aw_main_delegate.cc +++ b/android_webview/lib/main/aw_main_delegate.cc @@ -50,7 +50,8 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) { if (!cl->HasSwitch("disable-map-image")) cl->AppendSwitch(cc::switches::kUseMapImage); - // WebView uses the existing Android View edge effect for overscroll glow. + // WebView uses the Android system's scrollbars and overscroll glow. + cl->AppendSwitch(switches::kHideScrollbars); cl->AppendSwitch(switches::kDisableOverscrollEdgeEffect); return false; diff --git a/android_webview/libwebviewchromium.target.darwin-arm.mk b/android_webview/libwebviewchromium.target.darwin-arm.mk index e25ce17bb3..2689954af4 100644 --- a/android_webview/libwebviewchromium.target.darwin-arm.mk +++ b/android_webview/libwebviewchromium.target.darwin-arm.mk @@ -25,7 +25,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,testing_gtest_prod_gyp)/gtest_prod.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_modp_b64_modp_b64_gyp)/third_party_modp_b64_modp_b64_gyp.a \ $(call intermediates-dir-for,GYP,base_base_jni_headers_gyp)/base_jni_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,base_symbolize_gyp)/base_symbolize_gyp.a \ $(call intermediates-dir-for,GYP,third_party_ashmem_ashmem_gyp)/ashmem.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libevent_libevent_gyp)/third_party_libevent_libevent_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_gyp)/content_content_common_gyp.a \ @@ -63,7 +62,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_khronos_khronos_headers_gyp)/khronos_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_shared_memory_support_gyp)/media_shared_memory_support_gyp.a \ $(call intermediates-dir-for,GYP,media_media_android_jni_headers_gyp)/media_android_jni_headers.stamp \ - $(call intermediates-dir-for,GYP,media_media_player_jni_headers_gyp)/media_player_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_player_android_gyp)/media_player_android_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp)/ui_gl_gl_gyp.a \ $(call intermediates-dir-for,GYP,third_party_mesa_mesa_headers_gyp)/mesa_headers.stamp \ @@ -75,7 +73,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_user_agent_user_agent_gyp)/webkit_common_user_agent_user_agent_gyp.a \ $(call intermediates-dir-for,GYP,webkit_common_user_agent_webkit_version_gyp)/webkit_version.stamp \ $(call intermediates-dir-for,GYP,content_content_resources_gyp)/content_resources.stamp \ - $(call intermediates-dir-for,GYP,content_generate_content_resources_gyp)/generate_content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,cc_cc_gyp)/cc_cc_gyp.a \ $(call intermediates-dir-for,GYP,gpu_gpu_gyp)/gpu.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_command_buffer_client_gyp)/gpu_command_buffer_client_gyp.a \ @@ -108,8 +105,10 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_inspector_protocol_version_gyp)/generate_inspector_protocol_version.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_inspector_instrumentation_sources_gyp)/inspector_instrumentation_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_bindings_derived_sources_gyp)/bindings_derived_sources.stamp \ - $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_supplemental_dependencies_gyp)/supplemental_dependencies.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_interface_dependencies_gyp)/interface_dependencies.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_deprecated_perl_bindings_sources_gyp)/deprecated_perl_bindings_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_test_support_idls_gyp)/generate_test_support_idls.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_python_bindings_sources_gyp)/python_bindings_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_make_derived_sources_gyp)/make_derived_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_config_gyp)/config.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_weborigin_weborigin_gyp)/third_party_WebKit_Source_weborigin_weborigin_gyp.a \ @@ -144,27 +143,25 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_core_webcore_derived_gyp)/third_party_WebKit_Source_core_webcore_derived_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_core_webcore_arm_neon_gyp)/third_party_WebKit_Source_core_webcore_arm_neon_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_modules_modules_gyp)/third_party_WebKit_Source_modules_modules_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_base_webkit_base_gyp)/webkit_base_webkit_base_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_webkit_common_gyp)/webkit_common_webkit_common_gyp.a \ + $(call intermediates-dir-for,GYP,webkit_webkit_resources_gyp)/webkit_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_browser_gyp)/webkit_webkit_storage_browser_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,sql_sql_gyp)/sql_sql_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_leveldatabase_leveldatabase_gyp)/third_party_leveldatabase_leveldatabase_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_common_gyp)/webkit_webkit_storage_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_gyp)/webkit_support_glue_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,printing_printing_gyp)/printing_printing_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_glue_glue_common_gyp)/webkit_glue_glue_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_plugins_plugins_common_gyp)/webkit_plugins_plugins_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_compositor_bindings_webkit_compositor_support_gyp)/webkit_renderer_compositor_bindings_webkit_compositor_support_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp)/webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_gpu_webkit_gpu_gyp)/webkit_common_gpu_webkit_gpu_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_common_gyp)/webkit_support_glue_common_gyp.a \ + $(call intermediates-dir-for,GYP,webkit_webkit_strings_gyp)/webkit_strings.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_plugins_gyp)/webkit_support_plugins_gyp.a \ $(call intermediates-dir-for,GYP,ppapi_ppapi_c_gyp)/ppapi_c.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ppapi_ppapi_shared_gyp)/ppapi_ppapi_shared_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_surface_surface_gyp)/ui_surface_surface_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_webkit_common_gyp)/webkit_support_webkit_common_gyp.a \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_resources_gyp)/webkit_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_webkit_media_gyp)/webkit_support_webkit_media_gyp.a \ - $(call intermediates-dir-for,GYP,third_party_widevine_cdm_widevine_cdm_version_h_gyp)/widevine_cdm_version_h.stamp \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_strings_gyp)/webkit_strings.stamp \ $(call intermediates-dir-for,GYP,content_content_jni_headers_gyp)/content_jni_headers.stamp \ $(call intermediates-dir-for,GYP,content_java_set_jni_headers_gyp)/java_set_jni_headers.stamp \ $(call intermediates-dir-for,GYP,content_common_aidl_gyp)/common_aidl.stamp \ @@ -189,10 +186,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_hyphen_hyphen_gyp)/third_party_hyphen_hyphen_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libjingle_libjingle_gyp)/third_party_libjingle_libjingle_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libjingle_libjingle_p2p_constants_gyp)/third_party_libjingle_libjingle_p2p_constants_gyp.a \ + $(call intermediates-dir-for,GYP,third_party_widevine_cdm_widevine_cdm_version_h_gyp)/widevine_cdm_version_h.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_webkit_renderer_gyp)/webkit_renderer_webkit_renderer_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_renderer_gyp)/webkit_webkit_storage_renderer_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_renderer_gyp)/webkit_support_glue_renderer_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libphonenumber_libphonenumber_gyp)/third_party_libphonenumber_libphonenumber_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libphonenumber_libphonenumber_without_metadata_gyp)/third_party_libphonenumber_libphonenumber_without_metadata_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_utility_gyp)/content_content_utility_gyp.a \ $(call intermediates-dir-for,GYP,content_browser_devtools_devtools_resources_gyp)/devtools_resources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_generate_devtools_grd_gyp)/generate_devtools_grd.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_devtools_html_gyp)/devtools_html.stamp \ @@ -232,7 +231,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_app_gyp)/content_content_app_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_plugin_gyp)/content_content_plugin_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_ppapi_plugin_gyp)/content_content_ppapi_plugin_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_utility_gyp)/content_content_utility_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_worker_gyp)/content_content_worker_gyp.a \ $(call intermediates-dir-for,GYP,android_webview_android_webview_pak_gyp)/android_webview_pak.stamp @@ -286,8 +284,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -369,8 +368,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -476,7 +476,6 @@ LOCAL_STATIC_LIBRARIES := \ base_base_gyp \ base_allocator_allocator_extension_thunks_gyp \ third_party_modp_b64_modp_b64_gyp \ - base_symbolize_gyp \ third_party_libevent_libevent_gyp \ content_content_common_gyp \ components_tracing_gyp \ @@ -548,22 +547,21 @@ LOCAL_STATIC_LIBRARIES := \ third_party_WebKit_Source_core_webcore_derived_gyp \ third_party_WebKit_Source_core_webcore_arm_neon_gyp \ third_party_WebKit_Source_modules_modules_gyp \ - webkit_base_webkit_base_gyp \ + webkit_common_webkit_common_gyp \ webkit_webkit_storage_browser_gyp \ sql_sql_gyp \ third_party_leveldatabase_leveldatabase_gyp \ webkit_webkit_storage_common_gyp \ webkit_support_glue_gyp \ printing_printing_gyp \ + webkit_glue_glue_common_gyp \ webkit_plugins_plugins_common_gyp \ webkit_renderer_compositor_bindings_webkit_compositor_support_gyp \ webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp \ webkit_common_gpu_webkit_gpu_gyp \ - webkit_support_glue_common_gyp \ webkit_support_plugins_gyp \ ppapi_ppapi_shared_gyp \ ui_surface_surface_gyp \ - webkit_support_webkit_common_gyp \ webkit_support_webkit_media_gyp \ components_encryptor_gyp \ components_user_prefs_gyp \ @@ -582,10 +580,11 @@ LOCAL_STATIC_LIBRARIES := \ third_party_hyphen_hyphen_gyp \ third_party_libjingle_libjingle_gyp \ third_party_libjingle_libjingle_p2p_constants_gyp \ + webkit_renderer_webkit_renderer_gyp \ webkit_webkit_storage_renderer_gyp \ - webkit_support_glue_renderer_gyp \ third_party_libphonenumber_libphonenumber_gyp \ third_party_libphonenumber_libphonenumber_without_metadata_gyp \ + content_content_utility_gyp \ net_http_server_gyp \ sandbox_sandbox_services_gyp \ sandbox_seccomp_bpf_gyp \ @@ -600,7 +599,6 @@ LOCAL_STATIC_LIBRARIES := \ content_content_app_gyp \ content_content_plugin_gyp \ content_content_ppapi_plugin_gyp \ - content_content_utility_gyp \ content_content_worker_gyp # Enable grouping to fix circular references diff --git a/android_webview/libwebviewchromium.target.darwin-mips.mk b/android_webview/libwebviewchromium.target.darwin-mips.mk index f97d59f4ef..6198aff887 100644 --- a/android_webview/libwebviewchromium.target.darwin-mips.mk +++ b/android_webview/libwebviewchromium.target.darwin-mips.mk @@ -25,7 +25,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,testing_gtest_prod_gyp)/gtest_prod.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_modp_b64_modp_b64_gyp)/third_party_modp_b64_modp_b64_gyp.a \ $(call intermediates-dir-for,GYP,base_base_jni_headers_gyp)/base_jni_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,base_symbolize_gyp)/base_symbolize_gyp.a \ $(call intermediates-dir-for,GYP,third_party_ashmem_ashmem_gyp)/ashmem.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libevent_libevent_gyp)/third_party_libevent_libevent_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_gyp)/content_content_common_gyp.a \ @@ -62,7 +61,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_khronos_khronos_headers_gyp)/khronos_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_shared_memory_support_gyp)/media_shared_memory_support_gyp.a \ $(call intermediates-dir-for,GYP,media_media_android_jni_headers_gyp)/media_android_jni_headers.stamp \ - $(call intermediates-dir-for,GYP,media_media_player_jni_headers_gyp)/media_player_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_player_android_gyp)/media_player_android_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp)/ui_gl_gl_gyp.a \ $(call intermediates-dir-for,GYP,third_party_mesa_mesa_headers_gyp)/mesa_headers.stamp \ @@ -74,7 +72,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_user_agent_user_agent_gyp)/webkit_common_user_agent_user_agent_gyp.a \ $(call intermediates-dir-for,GYP,webkit_common_user_agent_webkit_version_gyp)/webkit_version.stamp \ $(call intermediates-dir-for,GYP,content_content_resources_gyp)/content_resources.stamp \ - $(call intermediates-dir-for,GYP,content_generate_content_resources_gyp)/generate_content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,cc_cc_gyp)/cc_cc_gyp.a \ $(call intermediates-dir-for,GYP,gpu_gpu_gyp)/gpu.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_command_buffer_client_gyp)/gpu_command_buffer_client_gyp.a \ @@ -107,8 +104,10 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_inspector_protocol_version_gyp)/generate_inspector_protocol_version.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_inspector_instrumentation_sources_gyp)/inspector_instrumentation_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_bindings_derived_sources_gyp)/bindings_derived_sources.stamp \ - $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_supplemental_dependencies_gyp)/supplemental_dependencies.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_interface_dependencies_gyp)/interface_dependencies.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_deprecated_perl_bindings_sources_gyp)/deprecated_perl_bindings_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_test_support_idls_gyp)/generate_test_support_idls.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_python_bindings_sources_gyp)/python_bindings_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_make_derived_sources_gyp)/make_derived_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_config_gyp)/config.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_weborigin_weborigin_gyp)/third_party_WebKit_Source_weborigin_weborigin_gyp.a \ @@ -142,27 +141,25 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_core_webcore_svg_gyp)/third_party_WebKit_Source_core_webcore_svg_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_core_webcore_derived_gyp)/third_party_WebKit_Source_core_webcore_derived_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_modules_modules_gyp)/third_party_WebKit_Source_modules_modules_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_base_webkit_base_gyp)/webkit_base_webkit_base_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_webkit_common_gyp)/webkit_common_webkit_common_gyp.a \ + $(call intermediates-dir-for,GYP,webkit_webkit_resources_gyp)/webkit_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_browser_gyp)/webkit_webkit_storage_browser_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,sql_sql_gyp)/sql_sql_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_leveldatabase_leveldatabase_gyp)/third_party_leveldatabase_leveldatabase_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_common_gyp)/webkit_webkit_storage_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_gyp)/webkit_support_glue_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,printing_printing_gyp)/printing_printing_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_glue_glue_common_gyp)/webkit_glue_glue_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_plugins_plugins_common_gyp)/webkit_plugins_plugins_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_compositor_bindings_webkit_compositor_support_gyp)/webkit_renderer_compositor_bindings_webkit_compositor_support_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp)/webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_gpu_webkit_gpu_gyp)/webkit_common_gpu_webkit_gpu_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_common_gyp)/webkit_support_glue_common_gyp.a \ + $(call intermediates-dir-for,GYP,webkit_webkit_strings_gyp)/webkit_strings.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_plugins_gyp)/webkit_support_plugins_gyp.a \ $(call intermediates-dir-for,GYP,ppapi_ppapi_c_gyp)/ppapi_c.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ppapi_ppapi_shared_gyp)/ppapi_ppapi_shared_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_surface_surface_gyp)/ui_surface_surface_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_webkit_common_gyp)/webkit_support_webkit_common_gyp.a \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_resources_gyp)/webkit_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_webkit_media_gyp)/webkit_support_webkit_media_gyp.a \ - $(call intermediates-dir-for,GYP,third_party_widevine_cdm_widevine_cdm_version_h_gyp)/widevine_cdm_version_h.stamp \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_strings_gyp)/webkit_strings.stamp \ $(call intermediates-dir-for,GYP,content_content_jni_headers_gyp)/content_jni_headers.stamp \ $(call intermediates-dir-for,GYP,content_java_set_jni_headers_gyp)/java_set_jni_headers.stamp \ $(call intermediates-dir-for,GYP,content_common_aidl_gyp)/common_aidl.stamp \ @@ -187,10 +184,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_hyphen_hyphen_gyp)/third_party_hyphen_hyphen_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libjingle_libjingle_gyp)/third_party_libjingle_libjingle_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libjingle_libjingle_p2p_constants_gyp)/third_party_libjingle_libjingle_p2p_constants_gyp.a \ + $(call intermediates-dir-for,GYP,third_party_widevine_cdm_widevine_cdm_version_h_gyp)/widevine_cdm_version_h.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_webkit_renderer_gyp)/webkit_renderer_webkit_renderer_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_renderer_gyp)/webkit_webkit_storage_renderer_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_renderer_gyp)/webkit_support_glue_renderer_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libphonenumber_libphonenumber_gyp)/third_party_libphonenumber_libphonenumber_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libphonenumber_libphonenumber_without_metadata_gyp)/third_party_libphonenumber_libphonenumber_without_metadata_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_utility_gyp)/content_content_utility_gyp.a \ $(call intermediates-dir-for,GYP,content_browser_devtools_devtools_resources_gyp)/devtools_resources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_generate_devtools_grd_gyp)/generate_devtools_grd.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_devtools_html_gyp)/devtools_html.stamp \ @@ -228,7 +227,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_app_gyp)/content_content_app_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_plugin_gyp)/content_content_plugin_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_ppapi_plugin_gyp)/content_content_ppapi_plugin_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_utility_gyp)/content_content_utility_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_worker_gyp)/content_content_worker_gyp.a \ $(call intermediates-dir-for,GYP,android_webview_android_webview_pak_gyp)/android_webview_pak.stamp @@ -282,6 +280,8 @@ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -363,6 +363,8 @@ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -464,7 +466,6 @@ LOCAL_STATIC_LIBRARIES := \ base_base_gyp \ base_allocator_allocator_extension_thunks_gyp \ third_party_modp_b64_modp_b64_gyp \ - base_symbolize_gyp \ third_party_libevent_libevent_gyp \ content_content_common_gyp \ components_tracing_gyp \ @@ -533,22 +534,21 @@ LOCAL_STATIC_LIBRARIES := \ third_party_WebKit_Source_core_webcore_svg_gyp \ third_party_WebKit_Source_core_webcore_derived_gyp \ third_party_WebKit_Source_modules_modules_gyp \ - webkit_base_webkit_base_gyp \ + webkit_common_webkit_common_gyp \ webkit_webkit_storage_browser_gyp \ sql_sql_gyp \ third_party_leveldatabase_leveldatabase_gyp \ webkit_webkit_storage_common_gyp \ webkit_support_glue_gyp \ printing_printing_gyp \ + webkit_glue_glue_common_gyp \ webkit_plugins_plugins_common_gyp \ webkit_renderer_compositor_bindings_webkit_compositor_support_gyp \ webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp \ webkit_common_gpu_webkit_gpu_gyp \ - webkit_support_glue_common_gyp \ webkit_support_plugins_gyp \ ppapi_ppapi_shared_gyp \ ui_surface_surface_gyp \ - webkit_support_webkit_common_gyp \ webkit_support_webkit_media_gyp \ components_encryptor_gyp \ components_user_prefs_gyp \ @@ -567,10 +567,11 @@ LOCAL_STATIC_LIBRARIES := \ third_party_hyphen_hyphen_gyp \ third_party_libjingle_libjingle_gyp \ third_party_libjingle_libjingle_p2p_constants_gyp \ + webkit_renderer_webkit_renderer_gyp \ webkit_webkit_storage_renderer_gyp \ - webkit_support_glue_renderer_gyp \ third_party_libphonenumber_libphonenumber_gyp \ third_party_libphonenumber_libphonenumber_without_metadata_gyp \ + content_content_utility_gyp \ net_http_server_gyp \ sandbox_sandbox_services_gyp \ components_webdata_common_gyp \ @@ -584,7 +585,6 @@ LOCAL_STATIC_LIBRARIES := \ content_content_app_gyp \ content_content_plugin_gyp \ content_content_ppapi_plugin_gyp \ - content_content_utility_gyp \ content_content_worker_gyp # Enable grouping to fix circular references diff --git a/android_webview/libwebviewchromium.target.darwin-x86.mk b/android_webview/libwebviewchromium.target.darwin-x86.mk index ab58d4a640..921a5ea217 100644 --- a/android_webview/libwebviewchromium.target.darwin-x86.mk +++ b/android_webview/libwebviewchromium.target.darwin-x86.mk @@ -25,7 +25,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,testing_gtest_prod_gyp)/gtest_prod.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_modp_b64_modp_b64_gyp)/third_party_modp_b64_modp_b64_gyp.a \ $(call intermediates-dir-for,GYP,base_base_jni_headers_gyp)/base_jni_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,base_symbolize_gyp)/base_symbolize_gyp.a \ $(call intermediates-dir-for,GYP,third_party_ashmem_ashmem_gyp)/ashmem.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libevent_libevent_gyp)/third_party_libevent_libevent_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_gyp)/content_content_common_gyp.a \ @@ -63,7 +62,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_shared_memory_support_gyp)/media_shared_memory_support_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_shared_memory_support_sse_gyp)/media_shared_memory_support_sse_gyp.a \ $(call intermediates-dir-for,GYP,media_media_android_jni_headers_gyp)/media_android_jni_headers.stamp \ - $(call intermediates-dir-for,GYP,media_media_player_jni_headers_gyp)/media_player_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_player_android_gyp)/media_player_android_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp)/ui_gl_gl_gyp.a \ $(call intermediates-dir-for,GYP,third_party_mesa_mesa_headers_gyp)/mesa_headers.stamp \ @@ -79,7 +77,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_user_agent_user_agent_gyp)/webkit_common_user_agent_user_agent_gyp.a \ $(call intermediates-dir-for,GYP,webkit_common_user_agent_webkit_version_gyp)/webkit_version.stamp \ $(call intermediates-dir-for,GYP,content_content_resources_gyp)/content_resources.stamp \ - $(call intermediates-dir-for,GYP,content_generate_content_resources_gyp)/generate_content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,cc_cc_gyp)/cc_cc_gyp.a \ $(call intermediates-dir-for,GYP,gpu_gpu_gyp)/gpu.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_command_buffer_client_gyp)/gpu_command_buffer_client_gyp.a \ @@ -112,8 +109,10 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_inspector_protocol_version_gyp)/generate_inspector_protocol_version.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_inspector_instrumentation_sources_gyp)/inspector_instrumentation_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_bindings_derived_sources_gyp)/bindings_derived_sources.stamp \ - $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_supplemental_dependencies_gyp)/supplemental_dependencies.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_interface_dependencies_gyp)/interface_dependencies.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_deprecated_perl_bindings_sources_gyp)/deprecated_perl_bindings_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_test_support_idls_gyp)/generate_test_support_idls.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_python_bindings_sources_gyp)/python_bindings_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_make_derived_sources_gyp)/make_derived_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_config_gyp)/config.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_weborigin_weborigin_gyp)/third_party_WebKit_Source_weborigin_weborigin_gyp.a \ @@ -147,27 +146,25 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_core_webcore_svg_gyp)/third_party_WebKit_Source_core_webcore_svg_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_core_webcore_derived_gyp)/third_party_WebKit_Source_core_webcore_derived_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_modules_modules_gyp)/third_party_WebKit_Source_modules_modules_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_base_webkit_base_gyp)/webkit_base_webkit_base_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_webkit_common_gyp)/webkit_common_webkit_common_gyp.a \ + $(call intermediates-dir-for,GYP,webkit_webkit_resources_gyp)/webkit_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_browser_gyp)/webkit_webkit_storage_browser_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,sql_sql_gyp)/sql_sql_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_leveldatabase_leveldatabase_gyp)/third_party_leveldatabase_leveldatabase_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_common_gyp)/webkit_webkit_storage_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_gyp)/webkit_support_glue_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,printing_printing_gyp)/printing_printing_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_glue_glue_common_gyp)/webkit_glue_glue_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_plugins_plugins_common_gyp)/webkit_plugins_plugins_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_compositor_bindings_webkit_compositor_support_gyp)/webkit_renderer_compositor_bindings_webkit_compositor_support_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp)/webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_gpu_webkit_gpu_gyp)/webkit_common_gpu_webkit_gpu_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_common_gyp)/webkit_support_glue_common_gyp.a \ + $(call intermediates-dir-for,GYP,webkit_webkit_strings_gyp)/webkit_strings.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_plugins_gyp)/webkit_support_plugins_gyp.a \ $(call intermediates-dir-for,GYP,ppapi_ppapi_c_gyp)/ppapi_c.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ppapi_ppapi_shared_gyp)/ppapi_ppapi_shared_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_surface_surface_gyp)/ui_surface_surface_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_webkit_common_gyp)/webkit_support_webkit_common_gyp.a \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_resources_gyp)/webkit_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_webkit_media_gyp)/webkit_support_webkit_media_gyp.a \ - $(call intermediates-dir-for,GYP,third_party_widevine_cdm_widevine_cdm_version_h_gyp)/widevine_cdm_version_h.stamp \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_strings_gyp)/webkit_strings.stamp \ $(call intermediates-dir-for,GYP,content_content_jni_headers_gyp)/content_jni_headers.stamp \ $(call intermediates-dir-for,GYP,content_java_set_jni_headers_gyp)/java_set_jni_headers.stamp \ $(call intermediates-dir-for,GYP,content_common_aidl_gyp)/common_aidl.stamp \ @@ -192,10 +189,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_hyphen_hyphen_gyp)/third_party_hyphen_hyphen_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libjingle_libjingle_gyp)/third_party_libjingle_libjingle_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libjingle_libjingle_p2p_constants_gyp)/third_party_libjingle_libjingle_p2p_constants_gyp.a \ + $(call intermediates-dir-for,GYP,third_party_widevine_cdm_widevine_cdm_version_h_gyp)/widevine_cdm_version_h.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_webkit_renderer_gyp)/webkit_renderer_webkit_renderer_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_renderer_gyp)/webkit_webkit_storage_renderer_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_renderer_gyp)/webkit_support_glue_renderer_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libphonenumber_libphonenumber_gyp)/third_party_libphonenumber_libphonenumber_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libphonenumber_libphonenumber_without_metadata_gyp)/third_party_libphonenumber_libphonenumber_without_metadata_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_utility_gyp)/content_content_utility_gyp.a \ $(call intermediates-dir-for,GYP,content_browser_devtools_devtools_resources_gyp)/devtools_resources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_generate_devtools_grd_gyp)/generate_devtools_grd.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_devtools_html_gyp)/devtools_html.stamp \ @@ -235,7 +234,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_app_gyp)/content_content_app_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_plugin_gyp)/content_content_plugin_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_ppapi_plugin_gyp)/content_content_ppapi_plugin_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_utility_gyp)/content_content_utility_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_worker_gyp)/content_content_worker_gyp.a \ $(call intermediates-dir-for,GYP,android_webview_android_webview_pak_gyp)/android_webview_pak.stamp @@ -291,8 +289,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -377,8 +376,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -479,7 +479,6 @@ LOCAL_STATIC_LIBRARIES := \ base_base_gyp \ base_allocator_allocator_extension_thunks_gyp \ third_party_modp_b64_modp_b64_gyp \ - base_symbolize_gyp \ third_party_libevent_libevent_gyp \ content_content_common_gyp \ components_tracing_gyp \ @@ -553,22 +552,21 @@ LOCAL_STATIC_LIBRARIES := \ third_party_WebKit_Source_core_webcore_svg_gyp \ third_party_WebKit_Source_core_webcore_derived_gyp \ third_party_WebKit_Source_modules_modules_gyp \ - webkit_base_webkit_base_gyp \ + webkit_common_webkit_common_gyp \ webkit_webkit_storage_browser_gyp \ sql_sql_gyp \ third_party_leveldatabase_leveldatabase_gyp \ webkit_webkit_storage_common_gyp \ webkit_support_glue_gyp \ printing_printing_gyp \ + webkit_glue_glue_common_gyp \ webkit_plugins_plugins_common_gyp \ webkit_renderer_compositor_bindings_webkit_compositor_support_gyp \ webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp \ webkit_common_gpu_webkit_gpu_gyp \ - webkit_support_glue_common_gyp \ webkit_support_plugins_gyp \ ppapi_ppapi_shared_gyp \ ui_surface_surface_gyp \ - webkit_support_webkit_common_gyp \ webkit_support_webkit_media_gyp \ components_encryptor_gyp \ components_user_prefs_gyp \ @@ -587,10 +585,11 @@ LOCAL_STATIC_LIBRARIES := \ third_party_hyphen_hyphen_gyp \ third_party_libjingle_libjingle_gyp \ third_party_libjingle_libjingle_p2p_constants_gyp \ + webkit_renderer_webkit_renderer_gyp \ webkit_webkit_storage_renderer_gyp \ - webkit_support_glue_renderer_gyp \ third_party_libphonenumber_libphonenumber_gyp \ third_party_libphonenumber_libphonenumber_without_metadata_gyp \ + content_content_utility_gyp \ net_http_server_gyp \ sandbox_sandbox_services_gyp \ sandbox_seccomp_bpf_gyp \ @@ -605,7 +604,6 @@ LOCAL_STATIC_LIBRARIES := \ content_content_app_gyp \ content_content_plugin_gyp \ content_content_ppapi_plugin_gyp \ - content_content_utility_gyp \ content_content_worker_gyp # Enable grouping to fix circular references diff --git a/android_webview/libwebviewchromium.target.linux-arm.mk b/android_webview/libwebviewchromium.target.linux-arm.mk index e25ce17bb3..2689954af4 100644 --- a/android_webview/libwebviewchromium.target.linux-arm.mk +++ b/android_webview/libwebviewchromium.target.linux-arm.mk @@ -25,7 +25,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,testing_gtest_prod_gyp)/gtest_prod.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_modp_b64_modp_b64_gyp)/third_party_modp_b64_modp_b64_gyp.a \ $(call intermediates-dir-for,GYP,base_base_jni_headers_gyp)/base_jni_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,base_symbolize_gyp)/base_symbolize_gyp.a \ $(call intermediates-dir-for,GYP,third_party_ashmem_ashmem_gyp)/ashmem.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libevent_libevent_gyp)/third_party_libevent_libevent_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_gyp)/content_content_common_gyp.a \ @@ -63,7 +62,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_khronos_khronos_headers_gyp)/khronos_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_shared_memory_support_gyp)/media_shared_memory_support_gyp.a \ $(call intermediates-dir-for,GYP,media_media_android_jni_headers_gyp)/media_android_jni_headers.stamp \ - $(call intermediates-dir-for,GYP,media_media_player_jni_headers_gyp)/media_player_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_player_android_gyp)/media_player_android_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp)/ui_gl_gl_gyp.a \ $(call intermediates-dir-for,GYP,third_party_mesa_mesa_headers_gyp)/mesa_headers.stamp \ @@ -75,7 +73,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_user_agent_user_agent_gyp)/webkit_common_user_agent_user_agent_gyp.a \ $(call intermediates-dir-for,GYP,webkit_common_user_agent_webkit_version_gyp)/webkit_version.stamp \ $(call intermediates-dir-for,GYP,content_content_resources_gyp)/content_resources.stamp \ - $(call intermediates-dir-for,GYP,content_generate_content_resources_gyp)/generate_content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,cc_cc_gyp)/cc_cc_gyp.a \ $(call intermediates-dir-for,GYP,gpu_gpu_gyp)/gpu.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_command_buffer_client_gyp)/gpu_command_buffer_client_gyp.a \ @@ -108,8 +105,10 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_inspector_protocol_version_gyp)/generate_inspector_protocol_version.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_inspector_instrumentation_sources_gyp)/inspector_instrumentation_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_bindings_derived_sources_gyp)/bindings_derived_sources.stamp \ - $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_supplemental_dependencies_gyp)/supplemental_dependencies.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_interface_dependencies_gyp)/interface_dependencies.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_deprecated_perl_bindings_sources_gyp)/deprecated_perl_bindings_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_test_support_idls_gyp)/generate_test_support_idls.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_python_bindings_sources_gyp)/python_bindings_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_make_derived_sources_gyp)/make_derived_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_config_gyp)/config.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_weborigin_weborigin_gyp)/third_party_WebKit_Source_weborigin_weborigin_gyp.a \ @@ -144,27 +143,25 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_core_webcore_derived_gyp)/third_party_WebKit_Source_core_webcore_derived_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_core_webcore_arm_neon_gyp)/third_party_WebKit_Source_core_webcore_arm_neon_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_modules_modules_gyp)/third_party_WebKit_Source_modules_modules_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_base_webkit_base_gyp)/webkit_base_webkit_base_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_webkit_common_gyp)/webkit_common_webkit_common_gyp.a \ + $(call intermediates-dir-for,GYP,webkit_webkit_resources_gyp)/webkit_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_browser_gyp)/webkit_webkit_storage_browser_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,sql_sql_gyp)/sql_sql_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_leveldatabase_leveldatabase_gyp)/third_party_leveldatabase_leveldatabase_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_common_gyp)/webkit_webkit_storage_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_gyp)/webkit_support_glue_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,printing_printing_gyp)/printing_printing_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_glue_glue_common_gyp)/webkit_glue_glue_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_plugins_plugins_common_gyp)/webkit_plugins_plugins_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_compositor_bindings_webkit_compositor_support_gyp)/webkit_renderer_compositor_bindings_webkit_compositor_support_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp)/webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_gpu_webkit_gpu_gyp)/webkit_common_gpu_webkit_gpu_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_common_gyp)/webkit_support_glue_common_gyp.a \ + $(call intermediates-dir-for,GYP,webkit_webkit_strings_gyp)/webkit_strings.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_plugins_gyp)/webkit_support_plugins_gyp.a \ $(call intermediates-dir-for,GYP,ppapi_ppapi_c_gyp)/ppapi_c.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ppapi_ppapi_shared_gyp)/ppapi_ppapi_shared_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_surface_surface_gyp)/ui_surface_surface_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_webkit_common_gyp)/webkit_support_webkit_common_gyp.a \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_resources_gyp)/webkit_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_webkit_media_gyp)/webkit_support_webkit_media_gyp.a \ - $(call intermediates-dir-for,GYP,third_party_widevine_cdm_widevine_cdm_version_h_gyp)/widevine_cdm_version_h.stamp \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_strings_gyp)/webkit_strings.stamp \ $(call intermediates-dir-for,GYP,content_content_jni_headers_gyp)/content_jni_headers.stamp \ $(call intermediates-dir-for,GYP,content_java_set_jni_headers_gyp)/java_set_jni_headers.stamp \ $(call intermediates-dir-for,GYP,content_common_aidl_gyp)/common_aidl.stamp \ @@ -189,10 +186,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_hyphen_hyphen_gyp)/third_party_hyphen_hyphen_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libjingle_libjingle_gyp)/third_party_libjingle_libjingle_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libjingle_libjingle_p2p_constants_gyp)/third_party_libjingle_libjingle_p2p_constants_gyp.a \ + $(call intermediates-dir-for,GYP,third_party_widevine_cdm_widevine_cdm_version_h_gyp)/widevine_cdm_version_h.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_webkit_renderer_gyp)/webkit_renderer_webkit_renderer_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_renderer_gyp)/webkit_webkit_storage_renderer_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_renderer_gyp)/webkit_support_glue_renderer_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libphonenumber_libphonenumber_gyp)/third_party_libphonenumber_libphonenumber_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libphonenumber_libphonenumber_without_metadata_gyp)/third_party_libphonenumber_libphonenumber_without_metadata_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_utility_gyp)/content_content_utility_gyp.a \ $(call intermediates-dir-for,GYP,content_browser_devtools_devtools_resources_gyp)/devtools_resources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_generate_devtools_grd_gyp)/generate_devtools_grd.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_devtools_html_gyp)/devtools_html.stamp \ @@ -232,7 +231,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_app_gyp)/content_content_app_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_plugin_gyp)/content_content_plugin_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_ppapi_plugin_gyp)/content_content_ppapi_plugin_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_utility_gyp)/content_content_utility_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_worker_gyp)/content_content_worker_gyp.a \ $(call intermediates-dir-for,GYP,android_webview_android_webview_pak_gyp)/android_webview_pak.stamp @@ -286,8 +284,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -369,8 +368,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -476,7 +476,6 @@ LOCAL_STATIC_LIBRARIES := \ base_base_gyp \ base_allocator_allocator_extension_thunks_gyp \ third_party_modp_b64_modp_b64_gyp \ - base_symbolize_gyp \ third_party_libevent_libevent_gyp \ content_content_common_gyp \ components_tracing_gyp \ @@ -548,22 +547,21 @@ LOCAL_STATIC_LIBRARIES := \ third_party_WebKit_Source_core_webcore_derived_gyp \ third_party_WebKit_Source_core_webcore_arm_neon_gyp \ third_party_WebKit_Source_modules_modules_gyp \ - webkit_base_webkit_base_gyp \ + webkit_common_webkit_common_gyp \ webkit_webkit_storage_browser_gyp \ sql_sql_gyp \ third_party_leveldatabase_leveldatabase_gyp \ webkit_webkit_storage_common_gyp \ webkit_support_glue_gyp \ printing_printing_gyp \ + webkit_glue_glue_common_gyp \ webkit_plugins_plugins_common_gyp \ webkit_renderer_compositor_bindings_webkit_compositor_support_gyp \ webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp \ webkit_common_gpu_webkit_gpu_gyp \ - webkit_support_glue_common_gyp \ webkit_support_plugins_gyp \ ppapi_ppapi_shared_gyp \ ui_surface_surface_gyp \ - webkit_support_webkit_common_gyp \ webkit_support_webkit_media_gyp \ components_encryptor_gyp \ components_user_prefs_gyp \ @@ -582,10 +580,11 @@ LOCAL_STATIC_LIBRARIES := \ third_party_hyphen_hyphen_gyp \ third_party_libjingle_libjingle_gyp \ third_party_libjingle_libjingle_p2p_constants_gyp \ + webkit_renderer_webkit_renderer_gyp \ webkit_webkit_storage_renderer_gyp \ - webkit_support_glue_renderer_gyp \ third_party_libphonenumber_libphonenumber_gyp \ third_party_libphonenumber_libphonenumber_without_metadata_gyp \ + content_content_utility_gyp \ net_http_server_gyp \ sandbox_sandbox_services_gyp \ sandbox_seccomp_bpf_gyp \ @@ -600,7 +599,6 @@ LOCAL_STATIC_LIBRARIES := \ content_content_app_gyp \ content_content_plugin_gyp \ content_content_ppapi_plugin_gyp \ - content_content_utility_gyp \ content_content_worker_gyp # Enable grouping to fix circular references diff --git a/android_webview/libwebviewchromium.target.linux-mips.mk b/android_webview/libwebviewchromium.target.linux-mips.mk index f97d59f4ef..6198aff887 100644 --- a/android_webview/libwebviewchromium.target.linux-mips.mk +++ b/android_webview/libwebviewchromium.target.linux-mips.mk @@ -25,7 +25,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,testing_gtest_prod_gyp)/gtest_prod.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_modp_b64_modp_b64_gyp)/third_party_modp_b64_modp_b64_gyp.a \ $(call intermediates-dir-for,GYP,base_base_jni_headers_gyp)/base_jni_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,base_symbolize_gyp)/base_symbolize_gyp.a \ $(call intermediates-dir-for,GYP,third_party_ashmem_ashmem_gyp)/ashmem.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libevent_libevent_gyp)/third_party_libevent_libevent_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_gyp)/content_content_common_gyp.a \ @@ -62,7 +61,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_khronos_khronos_headers_gyp)/khronos_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_shared_memory_support_gyp)/media_shared_memory_support_gyp.a \ $(call intermediates-dir-for,GYP,media_media_android_jni_headers_gyp)/media_android_jni_headers.stamp \ - $(call intermediates-dir-for,GYP,media_media_player_jni_headers_gyp)/media_player_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_player_android_gyp)/media_player_android_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp)/ui_gl_gl_gyp.a \ $(call intermediates-dir-for,GYP,third_party_mesa_mesa_headers_gyp)/mesa_headers.stamp \ @@ -74,7 +72,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_user_agent_user_agent_gyp)/webkit_common_user_agent_user_agent_gyp.a \ $(call intermediates-dir-for,GYP,webkit_common_user_agent_webkit_version_gyp)/webkit_version.stamp \ $(call intermediates-dir-for,GYP,content_content_resources_gyp)/content_resources.stamp \ - $(call intermediates-dir-for,GYP,content_generate_content_resources_gyp)/generate_content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,cc_cc_gyp)/cc_cc_gyp.a \ $(call intermediates-dir-for,GYP,gpu_gpu_gyp)/gpu.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_command_buffer_client_gyp)/gpu_command_buffer_client_gyp.a \ @@ -107,8 +104,10 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_inspector_protocol_version_gyp)/generate_inspector_protocol_version.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_inspector_instrumentation_sources_gyp)/inspector_instrumentation_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_bindings_derived_sources_gyp)/bindings_derived_sources.stamp \ - $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_supplemental_dependencies_gyp)/supplemental_dependencies.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_interface_dependencies_gyp)/interface_dependencies.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_deprecated_perl_bindings_sources_gyp)/deprecated_perl_bindings_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_test_support_idls_gyp)/generate_test_support_idls.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_python_bindings_sources_gyp)/python_bindings_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_make_derived_sources_gyp)/make_derived_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_config_gyp)/config.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_weborigin_weborigin_gyp)/third_party_WebKit_Source_weborigin_weborigin_gyp.a \ @@ -142,27 +141,25 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_core_webcore_svg_gyp)/third_party_WebKit_Source_core_webcore_svg_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_core_webcore_derived_gyp)/third_party_WebKit_Source_core_webcore_derived_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_modules_modules_gyp)/third_party_WebKit_Source_modules_modules_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_base_webkit_base_gyp)/webkit_base_webkit_base_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_webkit_common_gyp)/webkit_common_webkit_common_gyp.a \ + $(call intermediates-dir-for,GYP,webkit_webkit_resources_gyp)/webkit_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_browser_gyp)/webkit_webkit_storage_browser_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,sql_sql_gyp)/sql_sql_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_leveldatabase_leveldatabase_gyp)/third_party_leveldatabase_leveldatabase_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_common_gyp)/webkit_webkit_storage_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_gyp)/webkit_support_glue_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,printing_printing_gyp)/printing_printing_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_glue_glue_common_gyp)/webkit_glue_glue_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_plugins_plugins_common_gyp)/webkit_plugins_plugins_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_compositor_bindings_webkit_compositor_support_gyp)/webkit_renderer_compositor_bindings_webkit_compositor_support_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp)/webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_gpu_webkit_gpu_gyp)/webkit_common_gpu_webkit_gpu_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_common_gyp)/webkit_support_glue_common_gyp.a \ + $(call intermediates-dir-for,GYP,webkit_webkit_strings_gyp)/webkit_strings.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_plugins_gyp)/webkit_support_plugins_gyp.a \ $(call intermediates-dir-for,GYP,ppapi_ppapi_c_gyp)/ppapi_c.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ppapi_ppapi_shared_gyp)/ppapi_ppapi_shared_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_surface_surface_gyp)/ui_surface_surface_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_webkit_common_gyp)/webkit_support_webkit_common_gyp.a \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_resources_gyp)/webkit_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_webkit_media_gyp)/webkit_support_webkit_media_gyp.a \ - $(call intermediates-dir-for,GYP,third_party_widevine_cdm_widevine_cdm_version_h_gyp)/widevine_cdm_version_h.stamp \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_strings_gyp)/webkit_strings.stamp \ $(call intermediates-dir-for,GYP,content_content_jni_headers_gyp)/content_jni_headers.stamp \ $(call intermediates-dir-for,GYP,content_java_set_jni_headers_gyp)/java_set_jni_headers.stamp \ $(call intermediates-dir-for,GYP,content_common_aidl_gyp)/common_aidl.stamp \ @@ -187,10 +184,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_hyphen_hyphen_gyp)/third_party_hyphen_hyphen_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libjingle_libjingle_gyp)/third_party_libjingle_libjingle_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libjingle_libjingle_p2p_constants_gyp)/third_party_libjingle_libjingle_p2p_constants_gyp.a \ + $(call intermediates-dir-for,GYP,third_party_widevine_cdm_widevine_cdm_version_h_gyp)/widevine_cdm_version_h.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_webkit_renderer_gyp)/webkit_renderer_webkit_renderer_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_renderer_gyp)/webkit_webkit_storage_renderer_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_renderer_gyp)/webkit_support_glue_renderer_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libphonenumber_libphonenumber_gyp)/third_party_libphonenumber_libphonenumber_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libphonenumber_libphonenumber_without_metadata_gyp)/third_party_libphonenumber_libphonenumber_without_metadata_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_utility_gyp)/content_content_utility_gyp.a \ $(call intermediates-dir-for,GYP,content_browser_devtools_devtools_resources_gyp)/devtools_resources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_generate_devtools_grd_gyp)/generate_devtools_grd.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_devtools_html_gyp)/devtools_html.stamp \ @@ -228,7 +227,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_app_gyp)/content_content_app_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_plugin_gyp)/content_content_plugin_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_ppapi_plugin_gyp)/content_content_ppapi_plugin_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_utility_gyp)/content_content_utility_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_worker_gyp)/content_content_worker_gyp.a \ $(call intermediates-dir-for,GYP,android_webview_android_webview_pak_gyp)/android_webview_pak.stamp @@ -282,6 +280,8 @@ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -363,6 +363,8 @@ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -464,7 +466,6 @@ LOCAL_STATIC_LIBRARIES := \ base_base_gyp \ base_allocator_allocator_extension_thunks_gyp \ third_party_modp_b64_modp_b64_gyp \ - base_symbolize_gyp \ third_party_libevent_libevent_gyp \ content_content_common_gyp \ components_tracing_gyp \ @@ -533,22 +534,21 @@ LOCAL_STATIC_LIBRARIES := \ third_party_WebKit_Source_core_webcore_svg_gyp \ third_party_WebKit_Source_core_webcore_derived_gyp \ third_party_WebKit_Source_modules_modules_gyp \ - webkit_base_webkit_base_gyp \ + webkit_common_webkit_common_gyp \ webkit_webkit_storage_browser_gyp \ sql_sql_gyp \ third_party_leveldatabase_leveldatabase_gyp \ webkit_webkit_storage_common_gyp \ webkit_support_glue_gyp \ printing_printing_gyp \ + webkit_glue_glue_common_gyp \ webkit_plugins_plugins_common_gyp \ webkit_renderer_compositor_bindings_webkit_compositor_support_gyp \ webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp \ webkit_common_gpu_webkit_gpu_gyp \ - webkit_support_glue_common_gyp \ webkit_support_plugins_gyp \ ppapi_ppapi_shared_gyp \ ui_surface_surface_gyp \ - webkit_support_webkit_common_gyp \ webkit_support_webkit_media_gyp \ components_encryptor_gyp \ components_user_prefs_gyp \ @@ -567,10 +567,11 @@ LOCAL_STATIC_LIBRARIES := \ third_party_hyphen_hyphen_gyp \ third_party_libjingle_libjingle_gyp \ third_party_libjingle_libjingle_p2p_constants_gyp \ + webkit_renderer_webkit_renderer_gyp \ webkit_webkit_storage_renderer_gyp \ - webkit_support_glue_renderer_gyp \ third_party_libphonenumber_libphonenumber_gyp \ third_party_libphonenumber_libphonenumber_without_metadata_gyp \ + content_content_utility_gyp \ net_http_server_gyp \ sandbox_sandbox_services_gyp \ components_webdata_common_gyp \ @@ -584,7 +585,6 @@ LOCAL_STATIC_LIBRARIES := \ content_content_app_gyp \ content_content_plugin_gyp \ content_content_ppapi_plugin_gyp \ - content_content_utility_gyp \ content_content_worker_gyp # Enable grouping to fix circular references diff --git a/android_webview/libwebviewchromium.target.linux-x86.mk b/android_webview/libwebviewchromium.target.linux-x86.mk index ab58d4a640..921a5ea217 100644 --- a/android_webview/libwebviewchromium.target.linux-x86.mk +++ b/android_webview/libwebviewchromium.target.linux-x86.mk @@ -25,7 +25,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,testing_gtest_prod_gyp)/gtest_prod.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_modp_b64_modp_b64_gyp)/third_party_modp_b64_modp_b64_gyp.a \ $(call intermediates-dir-for,GYP,base_base_jni_headers_gyp)/base_jni_headers.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,base_symbolize_gyp)/base_symbolize_gyp.a \ $(call intermediates-dir-for,GYP,third_party_ashmem_ashmem_gyp)/ashmem.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libevent_libevent_gyp)/third_party_libevent_libevent_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_common_gyp)/content_content_common_gyp.a \ @@ -63,7 +62,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_shared_memory_support_gyp)/media_shared_memory_support_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_shared_memory_support_sse_gyp)/media_shared_memory_support_sse_gyp.a \ $(call intermediates-dir-for,GYP,media_media_android_jni_headers_gyp)/media_android_jni_headers.stamp \ - $(call intermediates-dir-for,GYP,media_media_player_jni_headers_gyp)/media_player_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,media_player_android_gyp)/media_player_android_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_gl_gl_gyp)/ui_gl_gl_gyp.a \ $(call intermediates-dir-for,GYP,third_party_mesa_mesa_headers_gyp)/mesa_headers.stamp \ @@ -79,7 +77,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_user_agent_user_agent_gyp)/webkit_common_user_agent_user_agent_gyp.a \ $(call intermediates-dir-for,GYP,webkit_common_user_agent_webkit_version_gyp)/webkit_version.stamp \ $(call intermediates-dir-for,GYP,content_content_resources_gyp)/content_resources.stamp \ - $(call intermediates-dir-for,GYP,content_generate_content_resources_gyp)/generate_content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,cc_cc_gyp)/cc_cc_gyp.a \ $(call intermediates-dir-for,GYP,gpu_gpu_gyp)/gpu.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_command_buffer_client_gyp)/gpu_command_buffer_client_gyp.a \ @@ -112,8 +109,10 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_inspector_protocol_version_gyp)/generate_inspector_protocol_version.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_inspector_instrumentation_sources_gyp)/inspector_instrumentation_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_bindings_derived_sources_gyp)/bindings_derived_sources.stamp \ - $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_supplemental_dependencies_gyp)/supplemental_dependencies.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_interface_dependencies_gyp)/interface_dependencies.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_deprecated_perl_bindings_sources_gyp)/deprecated_perl_bindings_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_generate_test_support_idls_gyp)/generate_test_support_idls.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_bindings_python_bindings_sources_gyp)/python_bindings_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_core_make_derived_sources_gyp)/make_derived_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_config_gyp)/config.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_weborigin_weborigin_gyp)/third_party_WebKit_Source_weborigin_weborigin_gyp.a \ @@ -147,27 +146,25 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_core_webcore_svg_gyp)/third_party_WebKit_Source_core_webcore_svg_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_core_webcore_derived_gyp)/third_party_WebKit_Source_core_webcore_derived_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_WebKit_Source_modules_modules_gyp)/third_party_WebKit_Source_modules_modules_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_base_webkit_base_gyp)/webkit_base_webkit_base_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_webkit_common_gyp)/webkit_common_webkit_common_gyp.a \ + $(call intermediates-dir-for,GYP,webkit_webkit_resources_gyp)/webkit_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_browser_gyp)/webkit_webkit_storage_browser_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,sql_sql_gyp)/sql_sql_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_leveldatabase_leveldatabase_gyp)/third_party_leveldatabase_leveldatabase_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_common_gyp)/webkit_webkit_storage_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_gyp)/webkit_support_glue_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,printing_printing_gyp)/printing_printing_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_glue_glue_common_gyp)/webkit_glue_glue_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_plugins_plugins_common_gyp)/webkit_plugins_plugins_common_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_compositor_bindings_webkit_compositor_support_gyp)/webkit_renderer_compositor_bindings_webkit_compositor_support_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp)/webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_common_gpu_webkit_gpu_gyp)/webkit_common_gpu_webkit_gpu_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_common_gyp)/webkit_support_glue_common_gyp.a \ + $(call intermediates-dir-for,GYP,webkit_webkit_strings_gyp)/webkit_strings.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_plugins_gyp)/webkit_support_plugins_gyp.a \ $(call intermediates-dir-for,GYP,ppapi_ppapi_c_gyp)/ppapi_c.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ppapi_ppapi_shared_gyp)/ppapi_ppapi_shared_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_surface_surface_gyp)/ui_surface_surface_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_webkit_common_gyp)/webkit_support_webkit_common_gyp.a \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_resources_gyp)/webkit_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_webkit_media_gyp)/webkit_support_webkit_media_gyp.a \ - $(call intermediates-dir-for,GYP,third_party_widevine_cdm_widevine_cdm_version_h_gyp)/widevine_cdm_version_h.stamp \ - $(call intermediates-dir-for,GYP,webkit_support_webkit_strings_gyp)/webkit_strings.stamp \ $(call intermediates-dir-for,GYP,content_content_jni_headers_gyp)/content_jni_headers.stamp \ $(call intermediates-dir-for,GYP,content_java_set_jni_headers_gyp)/java_set_jni_headers.stamp \ $(call intermediates-dir-for,GYP,content_common_aidl_gyp)/common_aidl.stamp \ @@ -192,10 +189,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_hyphen_hyphen_gyp)/third_party_hyphen_hyphen_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libjingle_libjingle_gyp)/third_party_libjingle_libjingle_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libjingle_libjingle_p2p_constants_gyp)/third_party_libjingle_libjingle_p2p_constants_gyp.a \ + $(call intermediates-dir-for,GYP,third_party_widevine_cdm_widevine_cdm_version_h_gyp)/widevine_cdm_version_h.stamp \ + $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_renderer_webkit_renderer_gyp)/webkit_renderer_webkit_renderer_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_webkit_storage_renderer_gyp)/webkit_webkit_storage_renderer_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,webkit_support_glue_renderer_gyp)/webkit_support_glue_renderer_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libphonenumber_libphonenumber_gyp)/third_party_libphonenumber_libphonenumber_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,third_party_libphonenumber_libphonenumber_without_metadata_gyp)/third_party_libphonenumber_libphonenumber_without_metadata_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_utility_gyp)/content_content_utility_gyp.a \ $(call intermediates-dir-for,GYP,content_browser_devtools_devtools_resources_gyp)/devtools_resources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_generate_devtools_grd_gyp)/generate_devtools_grd.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_devtools_html_gyp)/devtools_html.stamp \ @@ -235,7 +234,6 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_app_gyp)/content_content_app_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_plugin_gyp)/content_content_plugin_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_ppapi_plugin_gyp)/content_content_ppapi_plugin_gyp.a \ - $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_utility_gyp)/content_content_utility_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,content_content_worker_gyp)/content_content_worker_gyp.a \ $(call intermediates-dir-for,GYP,android_webview_android_webview_pak_gyp)/android_webview_pak.stamp @@ -291,8 +289,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -377,8 +376,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -479,7 +479,6 @@ LOCAL_STATIC_LIBRARIES := \ base_base_gyp \ base_allocator_allocator_extension_thunks_gyp \ third_party_modp_b64_modp_b64_gyp \ - base_symbolize_gyp \ third_party_libevent_libevent_gyp \ content_content_common_gyp \ components_tracing_gyp \ @@ -553,22 +552,21 @@ LOCAL_STATIC_LIBRARIES := \ third_party_WebKit_Source_core_webcore_svg_gyp \ third_party_WebKit_Source_core_webcore_derived_gyp \ third_party_WebKit_Source_modules_modules_gyp \ - webkit_base_webkit_base_gyp \ + webkit_common_webkit_common_gyp \ webkit_webkit_storage_browser_gyp \ sql_sql_gyp \ third_party_leveldatabase_leveldatabase_gyp \ webkit_webkit_storage_common_gyp \ webkit_support_glue_gyp \ printing_printing_gyp \ + webkit_glue_glue_common_gyp \ webkit_plugins_plugins_common_gyp \ webkit_renderer_compositor_bindings_webkit_compositor_support_gyp \ webkit_renderer_compositor_bindings_webkit_compositor_bindings_gyp \ webkit_common_gpu_webkit_gpu_gyp \ - webkit_support_glue_common_gyp \ webkit_support_plugins_gyp \ ppapi_ppapi_shared_gyp \ ui_surface_surface_gyp \ - webkit_support_webkit_common_gyp \ webkit_support_webkit_media_gyp \ components_encryptor_gyp \ components_user_prefs_gyp \ @@ -587,10 +585,11 @@ LOCAL_STATIC_LIBRARIES := \ third_party_hyphen_hyphen_gyp \ third_party_libjingle_libjingle_gyp \ third_party_libjingle_libjingle_p2p_constants_gyp \ + webkit_renderer_webkit_renderer_gyp \ webkit_webkit_storage_renderer_gyp \ - webkit_support_glue_renderer_gyp \ third_party_libphonenumber_libphonenumber_gyp \ third_party_libphonenumber_libphonenumber_without_metadata_gyp \ + content_content_utility_gyp \ net_http_server_gyp \ sandbox_sandbox_services_gyp \ sandbox_seccomp_bpf_gyp \ @@ -605,7 +604,6 @@ LOCAL_STATIC_LIBRARIES := \ content_content_app_gyp \ content_content_plugin_gyp \ content_content_ppapi_plugin_gyp \ - content_content_utility_gyp \ content_content_worker_gyp # Enable grouping to fix circular references diff --git a/android_webview/native/android_jar_jni_headers.target.darwin-arm.mk b/android_webview/native/android_jar_jni_headers.target.darwin-arm.mk index ada4cf7fac..db6feb791f 100644 --- a/android_webview/native/android_jar_jni_headers.target.darwin-arm.mk +++ b/android_webview/native/android_jar_jni_headers.target.darwin-arm.mk @@ -74,8 +74,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -151,8 +152,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/android_jar_jni_headers.target.darwin-mips.mk b/android_webview/native/android_jar_jni_headers.target.darwin-mips.mk index e5b92195eb..2191e05e7a 100644 --- a/android_webview/native/android_jar_jni_headers.target.darwin-mips.mk +++ b/android_webview/native/android_jar_jni_headers.target.darwin-mips.mk @@ -74,6 +74,8 @@ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -149,6 +151,8 @@ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/android_jar_jni_headers.target.darwin-x86.mk b/android_webview/native/android_jar_jni_headers.target.darwin-x86.mk index 22f1ccb2ce..cfb23680b1 100644 --- a/android_webview/native/android_jar_jni_headers.target.darwin-x86.mk +++ b/android_webview/native/android_jar_jni_headers.target.darwin-x86.mk @@ -76,8 +76,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -156,8 +157,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/android_jar_jni_headers.target.linux-arm.mk b/android_webview/native/android_jar_jni_headers.target.linux-arm.mk index ada4cf7fac..db6feb791f 100644 --- a/android_webview/native/android_jar_jni_headers.target.linux-arm.mk +++ b/android_webview/native/android_jar_jni_headers.target.linux-arm.mk @@ -74,8 +74,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -151,8 +152,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/android_jar_jni_headers.target.linux-mips.mk b/android_webview/native/android_jar_jni_headers.target.linux-mips.mk index e5b92195eb..2191e05e7a 100644 --- a/android_webview/native/android_jar_jni_headers.target.linux-mips.mk +++ b/android_webview/native/android_jar_jni_headers.target.linux-mips.mk @@ -74,6 +74,8 @@ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -149,6 +151,8 @@ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/android_jar_jni_headers.target.linux-x86.mk b/android_webview/native/android_jar_jni_headers.target.linux-x86.mk index 22f1ccb2ce..cfb23680b1 100644 --- a/android_webview/native/android_jar_jni_headers.target.linux-x86.mk +++ b/android_webview/native/android_jar_jni_headers.target.linux-x86.mk @@ -76,8 +76,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -156,8 +157,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/android_protocol_handler.cc b/android_webview/native/android_protocol_handler.cc index ff035912b5..407f62f1df 100644 --- a/android_webview/native/android_protocol_handler.cc +++ b/android_webview/native/android_protocol_handler.cc @@ -13,7 +13,6 @@ #include "base/android/jni_string.h" #include "base/strings/string_util.h" #include "content/public/common/url_constants.h" -#include "googleurl/src/gurl.h" #include "jni/AndroidProtocolHandler_jni.h" #include "net/base/io_buffer.h" #include "net/base/mime_util.h" @@ -22,6 +21,7 @@ #include "net/http/http_util.h" #include "net/url_request/protocol_intercept_job_factory.h" #include "net/url_request/url_request.h" +#include "url/gurl.h" using android_webview::InputStream; using android_webview::InputStreamImpl; diff --git a/android_webview/native/android_webview_native_jni.target.darwin-arm.mk b/android_webview/native/android_webview_native_jni.target.darwin-arm.mk index 5317deddc9..6792708acd 100644 --- a/android_webview/native/android_webview_native_jni.target.darwin-arm.mk +++ b/android_webview/native/android_webview_native_jni.target.darwin-arm.mk @@ -236,8 +236,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -313,8 +314,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/android_webview_native_jni.target.darwin-mips.mk b/android_webview/native/android_webview_native_jni.target.darwin-mips.mk index a88e95240a..e8dae1d72a 100644 --- a/android_webview/native/android_webview_native_jni.target.darwin-mips.mk +++ b/android_webview/native/android_webview_native_jni.target.darwin-mips.mk @@ -236,6 +236,8 @@ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -311,6 +313,8 @@ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/android_webview_native_jni.target.darwin-x86.mk b/android_webview/native/android_webview_native_jni.target.darwin-x86.mk index 190b38aa7a..9853f83d49 100644 --- a/android_webview/native/android_webview_native_jni.target.darwin-x86.mk +++ b/android_webview/native/android_webview_native_jni.target.darwin-x86.mk @@ -238,8 +238,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -318,8 +319,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/android_webview_native_jni.target.linux-arm.mk b/android_webview/native/android_webview_native_jni.target.linux-arm.mk index 5317deddc9..6792708acd 100644 --- a/android_webview/native/android_webview_native_jni.target.linux-arm.mk +++ b/android_webview/native/android_webview_native_jni.target.linux-arm.mk @@ -236,8 +236,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -313,8 +314,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/android_webview_native_jni.target.linux-mips.mk b/android_webview/native/android_webview_native_jni.target.linux-mips.mk index a88e95240a..e8dae1d72a 100644 --- a/android_webview/native/android_webview_native_jni.target.linux-mips.mk +++ b/android_webview/native/android_webview_native_jni.target.linux-mips.mk @@ -236,6 +236,8 @@ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -311,6 +313,8 @@ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/android_webview_native_jni.target.linux-x86.mk b/android_webview/native/android_webview_native_jni.target.linux-x86.mk index 190b38aa7a..9853f83d49 100644 --- a/android_webview/native/android_webview_native_jni.target.linux-x86.mk +++ b/android_webview/native/android_webview_native_jni.target.linux-x86.mk @@ -238,8 +238,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -318,8 +319,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/aw_autofill_manager_delegate.cc b/android_webview/native/aw_autofill_manager_delegate.cc index 4f928e8388..7e1cb73c7f 100644 --- a/android_webview/native/aw_autofill_manager_delegate.cc +++ b/android_webview/native/aw_autofill_manager_delegate.cc @@ -184,7 +184,7 @@ void AwAutofillManagerDelegate::ConfirmSaveCreditCard( void AwAutofillManagerDelegate::ShowAutocheckoutBubble( const gfx::RectF& bounding_box, bool is_google_user, - const base::Callback<void(bool)>& callback) { + const base::Callback<void(autofill::AutocheckoutBubbleState)>& callback) { NOTIMPLEMENTED(); } diff --git a/android_webview/native/aw_autofill_manager_delegate.h b/android_webview/native/aw_autofill_manager_delegate.h index 301dd23752..3ca7ee2f5f 100644 --- a/android_webview/native/aw_autofill_manager_delegate.h +++ b/android_webview/native/aw_autofill_manager_delegate.h @@ -13,6 +13,7 @@ #include "base/compiler_specific.h" #include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_service_builder.h" +#include "components/autofill/core/browser/autocheckout_bubble_state.h" #include "components/autofill/core/browser/autofill_manager_delegate.h" #include "content/public/browser/web_contents_user_data.h" @@ -75,7 +76,8 @@ class AwAutofillManagerDelegate virtual void ShowAutocheckoutBubble( const gfx::RectF& bounds, bool is_google_user, - const base::Callback<void(bool)>& callback) OVERRIDE; + const base::Callback<void( + autofill::AutocheckoutBubbleState)>& callback) OVERRIDE; virtual void HideAutocheckoutBubble() OVERRIDE; virtual void ShowRequestAutocompleteDialog( const autofill::FormData& form, diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc index f87a8dd6d6..e82fb28a7e 100644 --- a/android_webview/native/aw_contents.cc +++ b/android_webview/native/aw_contents.cc @@ -26,7 +26,7 @@ #include "base/atomicops.h" #include "base/bind.h" #include "base/callback.h" -#include "base/message_loop.h" +#include "base/message_loop/message_loop.h" #include "base/pickle.h" #include "base/strings/string16.h" #include "base/supports_user_data.h" @@ -701,20 +701,36 @@ void AwContents::ScrollContainerViewTo(gfx::Vector2d new_value) { } +void AwContents::DidOverscroll(gfx::Vector2d overscroll_delta) { + JNIEnv* env = AttachCurrentThread(); + ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); + if (obj.is_null()) + return; + Java_AwContents_didOverscroll( + env, obj.obj(), overscroll_delta.x(), overscroll_delta.y()); +} + void AwContents::SetDipScale(JNIEnv* env, jobject obj, jfloat dipScale) { browser_view_renderer_->SetDipScale(dipScale); } +void AwContents::SetDisplayedPageScaleFactor(JNIEnv* env, + jobject obj, + jfloat pageScaleFactor) { + browser_view_renderer_->SetPageScaleFactor(pageScaleFactor); +} + void AwContents::ScrollTo(JNIEnv* env, jobject obj, jint xPix, jint yPix) { browser_view_renderer_->ScrollTo(gfx::Vector2d(xPix, yPix)); } -void AwContents::OnPageScaleFactorChanged(float page_scale_factor) { +void AwContents::OnWebLayoutPageScaleFactorChanged(float page_scale_factor) { JNIEnv* env = AttachCurrentThread(); ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); if (obj.is_null()) return; - Java_AwContents_onPageScaleFactorChanged(env, obj.obj(), page_scale_factor); + Java_AwContents_onWebLayoutPageScaleFactorChanged(env, obj.obj(), + page_scale_factor); } ScopedJavaLocalRef<jobject> AwContents::CapturePicture(JNIEnv* env, diff --git a/android_webview/native/aw_contents.h b/android_webview/native/aw_contents.h index 40e3551da9..484ea10615 100644 --- a/android_webview/native/aw_contents.h +++ b/android_webview/native/aw_contents.h @@ -140,7 +140,8 @@ class AwContents : public FindHelper::Listener, const bool precomposed) OVERRIDE; // AwRenderViewHostExtClient implementation. - virtual void OnPageScaleFactorChanged(float page_scale_factor) OVERRIDE; + virtual void OnWebLayoutPageScaleFactorChanged( + float page_scale_factor) OVERRIDE; // BrowserViewRenderer::Client implementation. virtual bool RequestDrawGL(jobject canvas) OVERRIDE; @@ -148,6 +149,7 @@ class AwContents : public FindHelper::Listener, virtual void OnNewPicture() OVERRIDE; virtual gfx::Point GetLocationOnScreen() OVERRIDE; virtual void ScrollContainerViewTo(gfx::Vector2d new_value) OVERRIDE; + virtual void DidOverscroll(gfx::Vector2d overscroll_delta) OVERRIDE; void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending); @@ -155,6 +157,9 @@ class AwContents : public FindHelper::Listener, void ScrollTo(JNIEnv* env, jobject obj, jint xPix, jint yPix); void SetDipScale(JNIEnv* env, jobject obj, jfloat dipScale); + void SetDisplayedPageScaleFactor(JNIEnv* env, + jobject obj, + jfloat pageScaleFactor); void SetSaveFormData(bool enabled); diff --git a/android_webview/native/aw_contents_client_bridge.cc b/android_webview/native/aw_contents_client_bridge.cc index 213646fa9f..c044197a45 100644 --- a/android_webview/native/aw_contents_client_bridge.cc +++ b/android_webview/native/aw_contents_client_bridge.cc @@ -9,9 +9,9 @@ #include "base/android/jni_string.h" #include "base/callback.h" #include "content/public/browser/browser_thread.h" -#include "googleurl/src/gurl.h" #include "jni/AwContentsClientBridge_jni.h" #include "net/cert/x509_certificate.h" +#include "url/gurl.h" using base::android::AttachCurrentThread; using base::android::ConvertJavaStringToUTF16; diff --git a/android_webview/native/aw_contents_io_thread_client_impl.cc b/android_webview/native/aw_contents_io_thread_client_impl.cc index 226ba55114..81ea0de11f 100644 --- a/android_webview/native/aw_contents_io_thread_client_impl.cc +++ b/android_webview/native/aw_contents_io_thread_client_impl.cc @@ -20,10 +20,9 @@ #include "content/public/browser/resource_request_info.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" -#include "googleurl/src/gurl.h" -#include "net/url_request/url_request.h" - #include "jni/AwContentsIoThreadClient_jni.h" +#include "net/url_request/url_request.h" +#include "url/gurl.h" using base::android::AttachCurrentThread; using base::android::ConvertUTF8ToJavaString; diff --git a/android_webview/native/aw_quota_manager_bridge_impl.cc b/android_webview/native/aw_quota_manager_bridge_impl.cc index 4d1ffd8579..64275884a0 100644 --- a/android_webview/native/aw_quota_manager_bridge_impl.cc +++ b/android_webview/native/aw_quota_manager_bridge_impl.cc @@ -13,8 +13,8 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/storage_partition.h" #include "content/public/common/content_client.h" -#include "googleurl/src/gurl.h" #include "jni/AwQuotaManagerBridge_jni.h" +#include "url/gurl.h" #include "webkit/browser/quota/quota_manager.h" #include "webkit/common/quota/quota_types.h" diff --git a/android_webview/native/aw_web_contents_delegate.cc b/android_webview/native/aw_web_contents_delegate.cc index 3b6aae2067..91454ae28a 100644 --- a/android_webview/native/aw_web_contents_delegate.cc +++ b/android_webview/native/aw_web_contents_delegate.cc @@ -9,7 +9,7 @@ #include "android_webview/native/aw_contents.h" #include "base/android/scoped_java_ref.h" #include "base/lazy_instance.h" -#include "base/message_loop.h" +#include "base/message_loop/message_loop.h" #include "content/public/browser/web_contents.h" #include "jni/AwWebContentsDelegate_jni.h" diff --git a/android_webview/native/cookie_manager.cc b/android_webview/native/cookie_manager.cc index 597fa05900..387068f16c 100644 --- a/android_webview/native/cookie_manager.cc +++ b/android_webview/native/cookie_manager.cc @@ -11,7 +11,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/lazy_instance.h" -#include "base/message_loop.h" +#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop_proxy.h" #include "base/synchronization/waitable_event.h" #include "base/threading/thread_restrictions.h" diff --git a/android_webview/native/input_stream_impl.cc b/android_webview/native/input_stream_impl.cc index 515cb51ced..24d7be0993 100644 --- a/android_webview/native/input_stream_impl.cc +++ b/android_webview/native/input_stream_impl.cc @@ -77,7 +77,9 @@ bool InputStreamImpl::Read(net::IOBuffer* dest, int length, int* bytes_read) { JNIEnv* env = AttachCurrentThread(); if (!buffer_.obj()) { // Allocate transfer buffer. - buffer_.Reset(env, env->NewByteArray(kBufferSize)); + base::android::ScopedJavaLocalRef<jbyteArray> temp( + env, env->NewByteArray(kBufferSize)); + buffer_.Reset(temp); if (ClearException(env)) return false; } diff --git a/android_webview/native/state_serializer_unittests.cc b/android_webview/native/state_serializer_unittests.cc index cb245f43fe..f592d29ddf 100644 --- a/android_webview/native/state_serializer_unittests.cc +++ b/android_webview/native/state_serializer_unittests.cc @@ -14,8 +14,8 @@ #include "content/public/browser/navigation_entry.h" #include "content/public/common/content_client.h" #include "content/public/common/page_state.h" -#include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" +#include "url/gurl.h" using std::string; diff --git a/android_webview/native/webview_native.gyp b/android_webview/native/webview_native.gyp index 5090d7ccf5..987fe59a55 100644 --- a/android_webview/native/webview_native.gyp +++ b/android_webview/native/webview_native.gyp @@ -19,7 +19,7 @@ '../../skia/skia.gyp:skia', '../../ui/ui.gyp:ui', '../../webkit/common/user_agent/webkit_user_agent.gyp:user_agent', - '../../webkit/support/webkit_support.gyp:glue_common', + '../../webkit/glue/webkit_glue_common.gyp:glue_common', '../../webkit/storage_browser.gyp:webkit_storage_browser', '../../webkit/storage_common.gyp:webkit_storage_common', 'android_webview_native_jni', diff --git a/android_webview/native/webview_native.target.darwin-arm.mk b/android_webview/native/webview_native.target.darwin-arm.mk index 595da147b8..97e8235b64 100644 --- a/android_webview/native/webview_native.target.darwin-arm.mk +++ b/android_webview/native/webview_native.target.darwin-arm.mk @@ -85,8 +85,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -194,8 +195,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/webview_native.target.darwin-mips.mk b/android_webview/native/webview_native.target.darwin-mips.mk index 0c5142d6b4..229e9c6998 100644 --- a/android_webview/native/webview_native.target.darwin-mips.mk +++ b/android_webview/native/webview_native.target.darwin-mips.mk @@ -85,6 +85,8 @@ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -192,6 +194,8 @@ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/webview_native.target.darwin-x86.mk b/android_webview/native/webview_native.target.darwin-x86.mk index acf72daa9e..b39de48f65 100644 --- a/android_webview/native/webview_native.target.darwin-x86.mk +++ b/android_webview/native/webview_native.target.darwin-x86.mk @@ -87,8 +87,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -198,8 +199,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/webview_native.target.linux-arm.mk b/android_webview/native/webview_native.target.linux-arm.mk index 595da147b8..97e8235b64 100644 --- a/android_webview/native/webview_native.target.linux-arm.mk +++ b/android_webview/native/webview_native.target.linux-arm.mk @@ -85,8 +85,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -194,8 +195,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/webview_native.target.linux-mips.mk b/android_webview/native/webview_native.target.linux-mips.mk index 0c5142d6b4..229e9c6998 100644 --- a/android_webview/native/webview_native.target.linux-mips.mk +++ b/android_webview/native/webview_native.target.linux-mips.mk @@ -85,6 +85,8 @@ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -192,6 +194,8 @@ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/native/webview_native.target.linux-x86.mk b/android_webview/native/webview_native.target.linux-x86.mk index acf72daa9e..b39de48f65 100644 --- a/android_webview/native/webview_native.target.linux-x86.mk +++ b/android_webview/native/webview_native.target.linux-x86.mk @@ -87,8 +87,9 @@ MY_CFLAGS_Debug := \ MY_DEFS_Debug := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ @@ -198,8 +199,9 @@ MY_CFLAGS_Release := \ MY_DEFS_Release := \ '-DANGLE_DX11' \ '-D_FILE_OFFSET_BITS=64' \ - '-DUSE_LINUX_BREAKPAD' \ '-DNO_TCMALLOC' \ + '-DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY' \ + '-DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE' \ '-DDISABLE_NACL' \ '-DCHROMIUM_BUILD' \ '-DUSE_LIBJPEG_TURBO=1' \ diff --git a/android_webview/renderer/aw_content_renderer_client.cc b/android_webview/renderer/aw_content_renderer_client.cc index 5e7f37002f..e3d240fb8f 100644 --- a/android_webview/renderer/aw_content_renderer_client.cc +++ b/android_webview/renderer/aw_content_renderer_client.cc @@ -7,19 +7,19 @@ #include "android_webview/common/aw_resource.h" #include "android_webview/common/url_constants.h" #include "android_webview/renderer/aw_render_view_ext.h" -#include "base/message_loop.h" +#include "base/message_loop/message_loop.h" #include "base/strings/utf_string_conversions.h" #include "components/autofill/content/renderer/autofill_agent.h" #include "components/autofill/content/renderer/password_autofill_agent.h" #include "components/visitedlink/renderer/visitedlink_slave.h" #include "content/public/renderer/render_thread.h" -#include "googleurl/src/gurl.h" #include "net/base/net_errors.h" #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebURL.h" #include "third_party/WebKit/public/platform/WebURLError.h" #include "third_party/WebKit/public/platform/WebURLRequest.h" #include "third_party/WebKit/public/web/WebSecurityPolicy.h" +#include "url/gurl.h" namespace android_webview { diff --git a/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java b/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java index f3a3e88d3d..3860484070 100644 --- a/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java +++ b/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java @@ -32,6 +32,7 @@ public class AwTestContainerView extends FrameLayout { public AwTestContainerView(Context context) { super(context); mInternalAccessDelegate = new InternalAccessAdapter(); + setOverScrollMode(View.OVER_SCROLL_ALWAYS); } public void initialize(AwContents awContents) { @@ -105,6 +106,11 @@ public class AwTestContainerView extends FrameLayout { } @Override + public void onOverScrolled(int scrollX, int scrollY, boolean clampedX, boolean clampedY) { + mAwContents.onContainerViewOverScrolled(scrollX, scrollY, clampedX, clampedY); + } + + @Override public void onScrollChanged(int l, int t, int oldl, int oldt) { super.onScrollChanged(l, t, oldl, oldt); if (mAwContents != null) { @@ -171,6 +177,23 @@ public class AwTestContainerView extends FrameLayout { } @Override + public void super_scrollTo(int scrollX, int scrollY) { + // We're intentionally not calling super.scrollTo here to make testing easier. + AwTestContainerView.this.scrollTo(scrollX, scrollY); + } + + @Override + public void overScrollBy(int deltaX, int deltaY, + int scrollX, int scrollY, + int scrollRangeX, int scrollRangeY, + int maxOverScrollX, int maxOverScrollY, + boolean isTouchEvent) { + // We're intentionally not calling super.scrollTo here to make testing easier. + AwTestContainerView.this.overScrollBy(deltaX, deltaY, scrollX, scrollY, + scrollRangeX, scrollRangeY, maxOverScrollX, maxOverScrollY, isTouchEvent); + } + + @Override public void onScrollChanged(int l, int t, int oldl, int oldt) { AwTestContainerView.super.onScrollChanged(l, t, oldl, oldt); } diff --git a/android_webview/tools/third_party_files_whitelist.txt b/android_webview/tools/third_party_files_whitelist.txt index 3c7cc0a5bb..bc5ad88361 100644 --- a/android_webview/tools/third_party_files_whitelist.txt +++ b/android_webview/tools/third_party_files_whitelist.txt @@ -20,8 +20,6 @@ base/md5.cc # license. This third-party code is taken from Mozilla, the license for which # we already pick up from third_party/npapi/. chrome/browser/download/download_extensions.cc -# String 'copyright' used in code. -chrome/browser/importer/firefox_importer_utils.cc # Copyright Netscape Communications Corporation; MPL, GPL v2 or LGPL v2 # license. Not used on Android. chrome/browser/importer/firefox_profile_lock.cc @@ -34,18 +32,6 @@ chrome/browser/importer/firefox_profile_lock_posix.cc # Copyright Netscape Communications Corporation; MPL, GPL v2 or LGPL v2 # license. Not used on Android. chrome/browser/importer/firefox_profile_lock_win.cc -# Copyright Netscape Communications Corporation; MPL, GPL v2 or LGPL v2 -# license. Not used on Android. -chrome/browser/importer/nss_decryptor.cc -# Copyright Netscape Communications Corporation; MPL, GPL v2 or LGPL v2 -# license. Not used on Android. -chrome/browser/importer/nss_decryptor_mac.h -# Copyright Netscape Communications Corporation; MPL, GPL v2 or LGPL v2 -# license. Not used on Android. -chrome/browser/importer/nss_decryptor_system_nss.cc -# Copyright Netscape Communications Corporation; MPL, GPL v2 or LGPL v2 -# license. Not used on Android. -chrome/browser/importer/nss_decryptor_win.h # Credits notice for ChromeOS. chrome/browser/resources/chromeos/about_os_credits.html # String 'copyright' used in code. @@ -60,6 +46,20 @@ chrome/browser/resources/file_manager/js/media/mediaplayer_scripts.js chrome/browser/resources/file_manager/js/media/video_player_scripts.js # String 'copyright' used in code. chrome/browser/resources/file_manager/js/photo/photo_import_scripts.js +# String 'copyright' used in code. +chrome/common/importer/firefox_importer_utils.cc +# Copyright Netscape Communications Corporation; MPL, GPL v2 or LGPL v2 +# license. Not used on Android. +chrome/utility/importer/nss_decryptor.cc +# Copyright Netscape Communications Corporation; MPL, GPL v2 or LGPL v2 +# license. Not used on Android. +chrome/utility/importer/nss_decryptor_mac.h +# Copyright Netscape Communications Corporation; MPL, GPL v2 or LGPL v2 +# license. Not used on Android. +chrome/utility/importer/nss_decryptor_system_nss.cc +# Copyright Netscape Communications Corporation; MPL, GPL v2 or LGPL v2 +# license. Not used on Android. +chrome/utility/importer/nss_decryptor_win.h # Copyright Google Inc; no license. Example code only. chrome_frame/cfinstall/examples/jquery.html # Copyright Google Inc; no license. Example code only. |