diff options
Diffstat (limited to 'android_webview')
71 files changed, 1131 insertions, 217 deletions
diff --git a/android_webview/android_webview_common.target.darwin-arm.mk b/android_webview/android_webview_common.target.darwin-arm.mk index 46dd695eac..9a2354da2d 100644 --- a/android_webview/android_webview_common.target.darwin-arm.mk +++ b/android_webview/android_webview_common.target.darwin-arm.mk @@ -95,7 +95,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -147,12 +146,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -240,7 +242,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -292,12 +293,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -392,7 +396,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/android_webview_common.target.darwin-mips.mk b/android_webview/android_webview_common.target.darwin-mips.mk index 9e19f31b37..7cac1070e2 100644 --- a/android_webview/android_webview_common.target.darwin-mips.mk +++ b/android_webview/android_webview_common.target.darwin-mips.mk @@ -95,7 +95,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -146,12 +145,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -239,7 +241,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -290,12 +291,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -388,7 +392,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/android_webview_common.target.darwin-x86.mk b/android_webview/android_webview_common.target.darwin-x86.mk index 6fe5a7cfcb..c2a452771f 100644 --- a/android_webview/android_webview_common.target.darwin-x86.mk +++ b/android_webview/android_webview_common.target.darwin-x86.mk @@ -94,7 +94,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -148,12 +147,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -239,7 +241,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -293,12 +294,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -390,7 +394,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/android_webview_common.target.darwin-x86_64.mk b/android_webview/android_webview_common.target.darwin-x86_64.mk index 1107c381e3..7940d313db 100644 --- a/android_webview/android_webview_common.target.darwin-x86_64.mk +++ b/android_webview/android_webview_common.target.darwin-x86_64.mk @@ -96,7 +96,6 @@ MY_CFLAGS_Debug := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -148,12 +147,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -241,7 +243,6 @@ MY_CFLAGS_Release := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -293,12 +294,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -390,7 +394,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/android_webview_common.target.linux-arm.mk b/android_webview/android_webview_common.target.linux-arm.mk index 46dd695eac..9a2354da2d 100644 --- a/android_webview/android_webview_common.target.linux-arm.mk +++ b/android_webview/android_webview_common.target.linux-arm.mk @@ -95,7 +95,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -147,12 +146,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -240,7 +242,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -fno-tree-sra \ -fuse-ld=gold \ -Wno-psabi \ @@ -292,12 +293,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -392,7 +396,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/android_webview_common.target.linux-mips.mk b/android_webview/android_webview_common.target.linux-mips.mk index 9e19f31b37..7cac1070e2 100644 --- a/android_webview/android_webview_common.target.linux-mips.mk +++ b/android_webview/android_webview_common.target.linux-mips.mk @@ -95,7 +95,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -146,12 +145,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -239,7 +241,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -EL \ -mhard-float \ -ffunction-sections \ @@ -290,12 +291,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -388,7 +392,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/android_webview_common.target.linux-x86.mk b/android_webview/android_webview_common.target.linux-x86.mk index 6fe5a7cfcb..c2a452771f 100644 --- a/android_webview/android_webview_common.target.linux-x86.mk +++ b/android_webview/android_webview_common.target.linux-x86.mk @@ -94,7 +94,6 @@ MY_CFLAGS_Debug := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -148,12 +147,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -239,7 +241,6 @@ MY_CFLAGS_Release := \ -fvisibility=hidden \ -pipe \ -fPIC \ - -Wno-unknown-pragmas \ -msse2 \ -mfpmath=sse \ -mmmx \ @@ -293,12 +294,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -390,7 +394,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/android_webview_common.target.linux-x86_64.mk b/android_webview/android_webview_common.target.linux-x86_64.mk index 1107c381e3..7940d313db 100644 --- a/android_webview/android_webview_common.target.linux-x86_64.mk +++ b/android_webview/android_webview_common.target.linux-x86_64.mk @@ -96,7 +96,6 @@ MY_CFLAGS_Debug := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -148,12 +147,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -241,7 +243,6 @@ MY_CFLAGS_Release := \ -pipe \ -fPIC \ -Wno-unused-local-typedefs \ - -Wno-unknown-pragmas \ -m64 \ -march=x86-64 \ -fuse-ld=gold \ @@ -293,12 +294,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DCHROME_PNG_WRITE_SUPPORT' \ '-DPNG_USER_CONFIG' \ @@ -390,7 +394,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/android_webview_tests.gypi b/android_webview/android_webview_tests.gypi index 18fcbe1c6a..f3e8cbb5d9 100644 --- a/android_webview/android_webview_tests.gypi +++ b/android_webview/android_webview_tests.gypi @@ -100,6 +100,7 @@ 'browser/net/android_stream_reader_url_request_job_unittest.cc', 'browser/net/input_stream_reader_unittest.cc', 'lib/main/webview_tests.cc', + 'native/aw_contents_client_bridge_unittest.cc', 'native/input_stream_unittest.cc', 'native/state_serializer_unittest.cc', ], @@ -122,6 +123,7 @@ 'type': 'none', 'sources': [ '../android_webview/unittestjava/src/org/chromium/android_webview/unittest/InputStreamUnittest.java', + '../android_webview/unittestjava/src/org/chromium/android_webview/unittest/MockAwContentsClientBridge.java', ], 'variables': { 'jni_gen_package': 'android_webview_unittests', @@ -138,7 +140,6 @@ ], 'variables': { 'test_suite_name': 'android_webview_unittests', - 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)android_webview_unittests<(SHARED_LIB_SUFFIX)', }, 'includes': [ '../build/apk_test.gypi' ], }, diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc index 778e46648a..db2dfa908f 100644 --- a/android_webview/browser/aw_content_browser_client.cc +++ b/android_webview/browser/aw_content_browser_client.cc @@ -359,10 +359,13 @@ void AwContentBrowserClient::SelectClientCertificate( const net::HttpNetworkSession* network_session, net::SSLCertRequestInfo* cert_request_info, const base::Callback<void(net::X509Certificate*)>& callback) { - LOG(WARNING) << "Client certificate request from " - << cert_request_info->host_and_port.ToString() - << " rejected. (Client certificates not supported in WebView)"; - callback.Run(NULL); + AwContentsClientBridgeBase* client = + AwContentsClientBridgeBase::FromID(render_process_id, render_frame_id); + if (client) { + client->SelectClientCertificate(cert_request_info, callback); + } else { + callback.Run(NULL); + } } blink::WebNotificationPresenter::Permission @@ -376,16 +379,9 @@ blink::WebNotificationPresenter::Permission void AwContentBrowserClient::ShowDesktopNotification( const content::ShowDesktopNotificationHostMsgParams& params, - int render_process_id, - int render_view_id, - bool worker) { - NOTREACHED() << "Android WebView does not support desktop notifications."; -} - -void AwContentBrowserClient::CancelDesktopNotification( - int render_process_id, - int render_view_id, - int notification_id) { + content::RenderFrameHost* render_frame_host, + content::DesktopNotificationDelegate* delegate, + base::Closure* cancel_callback) { NOTREACHED() << "Android WebView does not support desktop notifications."; } diff --git a/android_webview/browser/aw_content_browser_client.h b/android_webview/browser/aw_content_browser_client.h index adae5834b3..9e4f5f3086 100644 --- a/android_webview/browser/aw_content_browser_client.h +++ b/android_webview/browser/aw_content_browser_client.h @@ -118,13 +118,9 @@ class AwContentBrowserClient : public content::ContentBrowserClient { int render_process_id) OVERRIDE; virtual void ShowDesktopNotification( const content::ShowDesktopNotificationHostMsgParams& params, - int render_process_id, - int render_view_id, - bool worker) OVERRIDE; - virtual void CancelDesktopNotification( - int render_process_id, - int render_view_id, - int notification_id) OVERRIDE; + content::RenderFrameHost* render_frame_host, + content::DesktopNotificationDelegate* delegate, + base::Closure* cancel_callback) OVERRIDE; virtual bool CanCreateWindow(const GURL& opener_url, const GURL& opener_top_level_frame_url, const GURL& source_origin, diff --git a/android_webview/browser/aw_contents_client_bridge_base.h b/android_webview/browser/aw_contents_client_bridge_base.h index a1b3b7fe7b..a24aa4bd9a 100644 --- a/android_webview/browser/aw_contents_client_bridge_base.h +++ b/android_webview/browser/aw_contents_client_bridge_base.h @@ -16,6 +16,7 @@ class WebContents; } namespace net { +class SSLCertRequestInfo; class X509Certificate; } @@ -28,6 +29,8 @@ namespace android_webview { // native/ from browser/ layer. class AwContentsClientBridgeBase { public: + typedef base::Callback<void(net::X509Certificate*)> SelectCertificateCallback; + // Adds the handler to the UserData registry. static void Associate(content::WebContents* web_contents, AwContentsClientBridgeBase* handler); @@ -43,6 +46,9 @@ class AwContentsClientBridgeBase { const GURL& request_url, const base::Callback<void(bool)>& callback, bool* cancel_request) = 0; + virtual void SelectClientCertificate( + net::SSLCertRequestInfo* cert_request_info, + const SelectCertificateCallback& callback) = 0; virtual void RunJavaScriptDialog( content::JavaScriptMessageType message_type, diff --git a/android_webview/browser/scoped_app_gl_state_restore.cc b/android_webview/browser/scoped_app_gl_state_restore.cc index 6f71eee686..059ce67173 100644 --- a/android_webview/browser/scoped_app_gl_state_restore.cc +++ b/android_webview/browser/scoped_app_gl_state_restore.cc @@ -4,6 +4,8 @@ #include "android_webview/browser/scoped_app_gl_state_restore.h" +#include <string> + #include "base/debug/trace_event.h" #include "base/lazy_instance.h" #include "ui/gl/gl_context.h" @@ -48,7 +50,9 @@ void GLEnableDisable(GLenum cap, bool enable) { glDisable(cap); } +bool g_globals_initialized = false; GLint g_gl_max_texture_units = 0; +bool g_oes_vertex_array_object = false; } // namespace @@ -124,9 +128,16 @@ ScopedAppGLStateRestore::ScopedAppGLStateRestore(CallMode mode) : mode_(mode) { glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &framebuffer_binding_ext_); - if (!g_gl_max_texture_units) { + if (!g_globals_initialized) { + g_globals_initialized = true; + glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &g_gl_max_texture_units); DCHECK_GT(g_gl_max_texture_units, 0); + + std::string extensions( + reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS))); + g_oes_vertex_array_object = + extensions.find("GL_OES_vertex_array_object") != std::string::npos; } glGetIntegerv(GL_ACTIVE_TEXTURE, &active_texture_); @@ -140,6 +151,9 @@ ScopedAppGLStateRestore::ScopedAppGLStateRestore(CallMode mode) : mode_(mode) { glGetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, &bindings.texture_external_oes); } + + if (g_oes_vertex_array_object) + glGetIntegerv(GL_VERTEX_ARRAY_BINDING_OES, &vertex_array_bindings_oes_); } ScopedAppGLStateRestore::~ScopedAppGLStateRestore() { @@ -225,6 +239,9 @@ ScopedAppGLStateRestore::~ScopedAppGLStateRestore() { GLEnableDisable(GL_STENCIL_TEST, stencil_test_); glStencilFunc(stencil_func_, stencil_mask_, stencil_ref_); + + if (g_oes_vertex_array_object) + glBindVertexArrayOES(vertex_array_bindings_oes_); } } // 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 index a6e1b93e28..d28c9a5679 100644 --- a/android_webview/browser/scoped_app_gl_state_restore.h +++ b/android_webview/browser/scoped_app_gl_state_restore.h @@ -95,6 +95,8 @@ class ScopedAppGLStateRestore { std::vector<TextureBindings> texture_bindings_; + GLint vertex_array_bindings_oes_; + DISALLOW_COPY_AND_ASSIGN(ScopedAppGLStateRestore); }; diff --git a/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java b/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java index fc991f8ef8..d52ad4e9bf 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java +++ b/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java @@ -8,6 +8,7 @@ import android.content.Context; import android.content.SharedPreferences; import org.chromium.content.browser.ContentViewStatics; +import org.chromium.net.DefaultAndroidKeyStore; /** * Java side of the Browser Context: contains all the java side objects needed to host one @@ -15,8 +16,6 @@ import org.chromium.content.browser.ContentViewStatics; * Note that due to running in single process mode, and limitations on renderer process only * being able to use a single browser context, currently there can only be one AwBrowserContext * instance, so at this point the class mostly exists for conceptual clarity. - * - * Obtain the default (singleton) instance with AwBrowserProcess.getDefaultBrowserContext(). */ public class AwBrowserContext { @@ -28,6 +27,8 @@ public class AwBrowserContext { private AwCookieManager mCookieManager; private AwFormDatabase mFormDatabase; private HttpAuthDatabase mHttpAuthDatabase; + private DefaultAndroidKeyStore mLocalKeyStore; + private ClientCertLookupTable mClientCertLookupTable; public AwBrowserContext(SharedPreferences sharedPreferences) { mSharedPreferences = sharedPreferences; @@ -61,6 +62,20 @@ public class AwBrowserContext { return mHttpAuthDatabase; } + public DefaultAndroidKeyStore getKeyStore() { + if (mLocalKeyStore == null) { + mLocalKeyStore = new DefaultAndroidKeyStore(); + } + return mLocalKeyStore; + } + + public ClientCertLookupTable getClientCertLookupTable() { + if (mClientCertLookupTable == null) { + mClientCertLookupTable = new ClientCertLookupTable(); + } + return mClientCertLookupTable; + } + /** * @see android.webkit.WebView#pauseTimers() */ diff --git a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java index b3aa4f8a85..7044cb77fc 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java +++ b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java @@ -5,18 +5,13 @@ package org.chromium.android_webview; import android.content.Context; -import android.os.Build; -import android.util.Log; import org.chromium.base.PathUtils; import org.chromium.base.ThreadUtils; -import org.chromium.base.TraceEvent; import org.chromium.base.library_loader.LibraryLoader; import org.chromium.base.library_loader.ProcessInitException; import org.chromium.content.browser.BrowserStartupController; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; /** * Wrapper for the steps needed to initialize the java and native sides of webview chromium. @@ -34,58 +29,11 @@ public abstract class AwBrowserProcess { PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); try { LibraryLoader.loadNow(); - initTraceEvent(); } catch (ProcessInitException e) { throw new RuntimeException("Cannot load WebView", e); } } - // TODO(benm): Move this function into WebView code in Android tree to avoid reflection. - private static void initTraceEvent() { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) return; - - try { - final Class<?> traceClass = Class.forName("android.os.Trace"); - final long traceTagView = traceClass.getField("TRACE_TAG_WEBVIEW").getLong(null); - - final Class<?> systemPropertiesClass = Class.forName("android.os.SystemProperties"); - final Method systemPropertiesGetLongMethod = systemPropertiesClass.getDeclaredMethod( - "getLong", String.class, Long.TYPE); - final Method addChangeCallbackMethod = systemPropertiesClass.getDeclaredMethod( - "addChangeCallback", Runnable.class); - - // Won't reach here if any of the above reflect lookups fail. - addChangeCallbackMethod.invoke(null, new Runnable() { - @Override - public void run() { - try { - long enabledFlags = (Long) systemPropertiesGetLongMethod.invoke( - null, "debug.atrace.tags.enableflags", 0); - TraceEvent.setATraceEnabled((enabledFlags & traceTagView) != 0); - } catch (IllegalArgumentException e) { - Log.e(TAG, "systemPropertyChanged", e); - } catch (IllegalAccessException e) { - Log.e(TAG, "systemPropertyChanged", e); - } catch (InvocationTargetException e) { - Log.e(TAG, "systemPropertyChanged", e); - } - } - }); - } catch (ClassNotFoundException e) { - Log.e(TAG, "initTraceEvent", e); - } catch (NoSuchMethodException e) { - Log.e(TAG, "initTraceEvent", e); - } catch (IllegalArgumentException e) { - Log.e(TAG, "initTraceEvent", e); - } catch (IllegalAccessException e) { - Log.e(TAG, "initTraceEvent", e); - } catch (InvocationTargetException e) { - Log.e(TAG, "initTraceEvent", e); - } catch (NoSuchFieldException e) { - Log.e(TAG, "initTraceEvent", e); - } - } - /** * Starts the chromium browser process running within this process. Creates threads * and performs other per-app resource allocations; must not be called from zygote. 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 c8796acaf8..832e907200 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContents.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java @@ -508,7 +508,8 @@ public class AwContents { mLayoutSizer.setDelegate(new AwLayoutSizerDelegate()); mLayoutSizer.setDIPScale(mDIPScale); mWebContentsDelegate = new AwWebContentsDelegateAdapter(contentsClient, mContainerView); - mContentsClientBridge = new AwContentsClientBridge(contentsClient); + mContentsClientBridge = new AwContentsClientBridge(contentsClient, + mBrowserContext.getKeyStore(), mBrowserContext.getClientCertLookupTable()); mZoomControls = new AwZoomControls(this); mIoThreadClient = new IoThreadClientImpl(); mInterceptNavigationDelegate = new InterceptNavigationDelegateImpl(); @@ -1369,6 +1370,15 @@ public class AwContents { } /** + * @see android.webkit.WebView#clearClientCertPreferences() + */ + public void clearClientCertPreferences() { + mBrowserContext.getClientCertLookupTable().clear(); + if (mNativeAwContents == 0) return; + nativeClearClientCertPreferences(mNativeAwContents); + } + + /** * Method to return all hit test values relevant to public WebView API. * Note that this expose more data than needed for WebView.getHitTestResult. * Unsafely returning reference to mutable internal object to avoid excessive @@ -2140,4 +2150,5 @@ public class AwContents { private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExporter awPdfExporter); + private native void nativeClearClientCertPreferences(long 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 22e7c7dacb..fa59347f18 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java @@ -21,6 +21,8 @@ import org.chromium.content.browser.ContentViewCore; import org.chromium.content.browser.WebContentsObserverAndroid; import org.chromium.net.NetError; +import java.security.Principal; + /** * Base-class that an AwContents embedder derives from to receive callbacks. * This extends ContentViewClient, as in many cases we want to pass-thru ContentViewCore @@ -165,6 +167,12 @@ public abstract class AwContentsClient { public abstract void onReceivedSslError(ValueCallback<Boolean> callback, SslError error); + // TODO(sgurun): Make abstract once this has rolled in downstream. + public void onReceivedClientCertRequest( + final AwContentsClientBridge.ClientCertificateRequestCallback callback, + final String[] keyTypes, final Principal[] principals, final String host, + final int port) { } + public abstract void onReceivedLoginRequest(String realm, String account, String args); public abstract void onFormResubmission(Message dontResend, Message resend); diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsClientBridge.java b/android_webview/java/src/org/chromium/android_webview/AwContentsClientBridge.java index 66e4f1ec95..7b0bb40297 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContentsClientBridge.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClientBridge.java @@ -6,10 +6,21 @@ package org.chromium.android_webview; import android.net.http.SslCertificate; import android.net.http.SslError; +import android.util.Log; import android.webkit.ValueCallback; import org.chromium.base.CalledByNative; import org.chromium.base.JNINamespace; +import org.chromium.base.ThreadUtils; +import org.chromium.net.AndroidPrivateKey; +import org.chromium.net.DefaultAndroidKeyStore; + +import java.security.Principal; +import java.security.PrivateKey; +import java.security.cert.CertificateEncodingException; +import java.security.cert.X509Certificate; + +import javax.security.auth.x500.X500Principal; /** * This class handles the JNI communication logic for the the AwContentsClient class. @@ -20,14 +31,125 @@ import org.chromium.base.JNINamespace; */ @JNINamespace("android_webview") public class AwContentsClientBridge { + static final String TAG = "AwContentsClientBridge"; private AwContentsClient mClient; // The native peer of this object. private long mNativeContentsClientBridge; - public AwContentsClientBridge(AwContentsClient client) { + private DefaultAndroidKeyStore mLocalKeyStore; + + private ClientCertLookupTable mLookupTable; + + // Used for mocking this class in tests. + protected AwContentsClientBridge(DefaultAndroidKeyStore keyStore, + ClientCertLookupTable table) { + mLocalKeyStore = keyStore; + mLookupTable = table; + } + + public AwContentsClientBridge(AwContentsClient client, DefaultAndroidKeyStore keyStore, + ClientCertLookupTable table) { assert client != null; mClient = client; + mLocalKeyStore = keyStore; + mLookupTable = table; + } + + /** + * Callback to communicate clientcertificaterequest back to the AwContentsClientBridge. + * The public methods should be called on UI thread. + * A request can not be proceeded, ignored or canceled more than once. Doing this + * is a programming error and causes an exception. + */ + public class ClientCertificateRequestCallback { + + private int mId; + private String mHost; + private int mPort; + private boolean mIsCalled; + + public ClientCertificateRequestCallback(int id, String host, int port) { + mId = id; + mHost = host; + mPort = port; + } + + public void proceed(final PrivateKey privateKey, final X509Certificate[] chain) { + ThreadUtils.runOnUiThread(new Runnable() { + @Override + public void run() { + proceedOnUiThread(privateKey, chain); + } + }); + } + + public void ignore() { + ThreadUtils.runOnUiThread(new Runnable() { + @Override + public void run() { + ignoreOnUiThread(); + } + }); + } + + public void cancel() { + ThreadUtils.runOnUiThread(new Runnable() { + @Override + public void run() { + cancelOnUiThread(); + } + + }); + } + + private void proceedOnUiThread(PrivateKey privateKey, X509Certificate[] chain) { + checkIfCalled(); + + AndroidPrivateKey key = mLocalKeyStore.createKey(privateKey); + + if (key == null || chain == null || chain.length == 0) { + Log.w(TAG, "Empty client certificate chain?"); + provideResponse(null, null); + return; + } + // Encode the certificate chain. + byte[][] encodedChain = new byte[chain.length][]; + try { + for (int i = 0; i < chain.length; ++i) { + encodedChain[i] = chain[i].getEncoded(); + } + } catch (CertificateEncodingException e) { + Log.w(TAG, "Could not retrieve encoded certificate chain: " + e); + provideResponse(null, null); + return; + } + mLookupTable.allow(mHost, mPort, key, encodedChain); + provideResponse(key, encodedChain); + } + + private void ignoreOnUiThread() { + checkIfCalled(); + provideResponse(null, null); + } + + private void cancelOnUiThread() { + checkIfCalled(); + mLookupTable.deny(mHost, mPort); + provideResponse(null, null); + } + + private void checkIfCalled() { + if (mIsCalled) { + throw new IllegalStateException("The callback was already called."); + } + mIsCalled = true; + } + + private void provideResponse(AndroidPrivateKey androidKey, byte[][] certChain) { + nativeProvideClientCertificateResponse(mNativeContentsClientBridge, mId, + certChain, androidKey); + } } // Used by the native peer to set/reset a weak ref to the native peer. @@ -53,8 +175,13 @@ public class AwContentsClientBridge { final SslError sslError = SslUtil.sslErrorFromNetErrorCode(certError, cert, url); ValueCallback<Boolean> callback = new ValueCallback<Boolean>() { @Override - public void onReceiveValue(Boolean value) { - proceedSslError(value.booleanValue(), id); + public void onReceiveValue(final Boolean value) { + ThreadUtils.runOnUiThread(new Runnable() { + @Override + public void run() { + proceedSslError(value.booleanValue(), id); + } + }); } }; mClient.onReceivedSslError(callback, sslError); @@ -66,6 +193,43 @@ public class AwContentsClientBridge { nativeProceedSslError(mNativeContentsClientBridge, proceed, id); } + // Intentionally not private for testing the native peer of this class. + @CalledByNative + protected void selectClientCertificate(final int id, final String[] keyTypes, + byte[][] encodedPrincipals, final String host, final int port) { + ClientCertLookupTable.Cert cert = mLookupTable.getCertData(host, port); + if (mLookupTable.isDenied(host, port)) { + nativeProvideClientCertificateResponse(mNativeContentsClientBridge, id, + null, null); + return; + } + if (cert != null) { + nativeProvideClientCertificateResponse(mNativeContentsClientBridge, id, + cert.certChain, cert.privateKey); + return; + } + // Build the list of principals from encoded versions. + Principal[] principals = null; + if (encodedPrincipals.length > 0) { + principals = new X500Principal[encodedPrincipals.length]; + for (int n = 0; n < encodedPrincipals.length; n++) { + try { + principals[n] = new X500Principal(encodedPrincipals[n]); + } catch (IllegalArgumentException e) { + Log.w(TAG, "Exception while decoding issuers list: " + e); + nativeProvideClientCertificateResponse(mNativeContentsClientBridge, id, + null, null); + return; + } + } + + } + + final ClientCertificateRequestCallback callback = + new ClientCertificateRequestCallback(id, host, port); + mClient.onReceivedClientCertRequest(callback, keyTypes, principals, host, port); + } + @CalledByNative private void handleJsAlert(String url, String message, int id) { JsResultHandler handler = new JsResultHandler(this, id); @@ -110,6 +274,8 @@ public class AwContentsClientBridge { //-------------------------------------------------------------------------------------------- private native void nativeProceedSslError(long nativeAwContentsClientBridge, boolean proceed, int id); + private native void nativeProvideClientCertificateResponse(long nativeAwContentsClientBridge, + int id, byte[][] certChain, AndroidPrivateKey androidKey); private native void nativeConfirmJsResult(long nativeAwContentsClientBridge, int id, String prompt); diff --git a/android_webview/java/src/org/chromium/android_webview/AwSettings.java b/android_webview/java/src/org/chromium/android_webview/AwSettings.java index a00235b7eb..0b43d0b926 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwSettings.java +++ b/android_webview/java/src/org/chromium/android_webview/AwSettings.java @@ -14,6 +14,8 @@ import android.util.Log; import android.webkit.WebSettings; import android.webkit.WebSettings.PluginState; +import com.google.common.annotations.VisibleForTesting; + import org.chromium.base.CalledByNative; import org.chromium.base.JNINamespace; import org.chromium.base.ThreadUtils; @@ -36,6 +38,14 @@ public class AwSettings { TEXT_AUTOSIZING, } + // These constants must be kept in sync with the Android framework, defined in WebSettimgs. + @VisibleForTesting + public static final int MIXED_CONTENT_ALWAYS_ALLOW = 0; + @VisibleForTesting + public static final int MIXED_CONTENT_NEVER_ALLOW = 1; + @VisibleForTesting + public static final int MIXED_CONTENT_COMPATIBILITY_MODE = 2; + private static final String TAG = "AwSettings"; // This class must be created on the UI thread. Afterwards, it can be @@ -83,6 +93,7 @@ public class AwSettings { private float mInitialPageScalePercent = 0; private boolean mSpatialNavigationEnabled; // Default depends on device features. private boolean mEnableSupportedHardwareAcceleratedFeatures = false; + private int mMixedContentMode = MIXED_CONTENT_NEVER_ALLOW; private final boolean mSupportLegacyQuirks; @@ -1430,6 +1441,34 @@ public class AwSettings { } } + public void setMixedContentMode(int mode) { + synchronized (mAwSettingsLock) { + if (mMixedContentMode != mode) { + mMixedContentMode = mode; + mEventHandler.updateWebkitPreferencesLocked(); + } + } + } + + public int getMixedContentMode() { + synchronized (mAwSettingsLock) { + return mMixedContentMode; + } + } + + @CalledByNative + private boolean getAllowRunningInsecureContentLocked() { + assert Thread.holdsLock(mAwSettingsLock); + return mMixedContentMode == MIXED_CONTENT_ALWAYS_ALLOW; + } + + @CalledByNative + private boolean getAllowDisplayingInsecureContentLocked() { + assert Thread.holdsLock(mAwSettingsLock); + return mMixedContentMode == MIXED_CONTENT_ALWAYS_ALLOW || + mMixedContentMode == MIXED_CONTENT_COMPATIBILITY_MODE; + } + @CalledByNative private boolean supportsDoubleTapZoomLocked() { assert Thread.holdsLock(mAwSettingsLock); diff --git a/android_webview/java/src/org/chromium/android_webview/ClientCertLookupTable.java b/android_webview/java/src/org/chromium/android_webview/ClientCertLookupTable.java new file mode 100644 index 0000000000..65ef44aced --- /dev/null +++ b/android_webview/java/src/org/chromium/android_webview/ClientCertLookupTable.java @@ -0,0 +1,76 @@ +// Copyright 2014 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; + +import org.chromium.net.AndroidPrivateKey; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +/** + * Store user's client certificate decision for a host and port pair. Not + * thread-safe. All accesses are done on UI thread. + */ +public class ClientCertLookupTable { + + /** + * A container for the certificate data. + */ + public static class Cert { + AndroidPrivateKey privateKey; + byte[][] certChain; + public Cert(AndroidPrivateKey privateKey, byte[][] certChain) { + this.privateKey = privateKey; + byte[][] newChain = new byte[certChain.length][]; + for (int i = 0; i < certChain.length; i++) { + newChain[i] = Arrays.copyOf(certChain[i], certChain[i].length); + } + this.certChain = newChain; + } + }; + + private final Map<String, Cert> mCerts; + private final Set<String> mDenieds; + + // Clear client certificate preferences + public void clear() { + mCerts.clear(); + mDenieds.clear(); + } + + public ClientCertLookupTable() { + mCerts = new HashMap<String, Cert>(); + mDenieds = new HashSet<String>(); + } + + public void allow(String host, int port, AndroidPrivateKey privateKey, byte[][] chain) { + String host_and_port = hostAndPort(host, port); + mCerts.put(host_and_port, new Cert(privateKey, chain)); + mDenieds.remove(host_and_port); + } + + public void deny(String host, int port) { + String host_and_port = hostAndPort(host, port); + mCerts.remove(host_and_port); + mDenieds.add(host_and_port); + } + + public Cert getCertData(String host, int port) { + return mCerts.get(hostAndPort(host, port)); + } + + public boolean isDenied(String host, int port) { + return mDenieds.contains(hostAndPort(host, port)); + } + + // TODO(sgurun) add a test for this. Not separating host and pair properly will be + // a security issue. + private static String hostAndPort(String host, int port) { + return host + ":" + port; + } +} diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java index f26696a0ac..ee50901a01 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenVideoTest.java @@ -4,39 +4,63 @@ package org.chromium.android_webview.test; +import android.test.suitebuilder.annotation.MediumTest; import android.view.KeyEvent; import org.chromium.android_webview.test.util.VideoTestWebServer; -import org.chromium.base.test.util.DisabledTest; import org.chromium.base.test.util.Feature; +import org.chromium.content.browser.ContentVideoView; import org.chromium.content.browser.test.util.TouchCommon; /** * Test WebChromeClient::onShow/HideCustomView. */ public class AwContentsClientFullScreenVideoTest extends AwTestBase { + private FullScreenVideoTestAwContentsClient mContentsClient; - /** Disabled to unblock the waterfall, investigating in http://crbug.com/361514. */ + @MediumTest @Feature({"AndroidWebView"}) - @DisabledTest - public void testOnShowAndHideCustomView() throws Throwable { - FullScreenVideoTestAwContentsClient contentsClient = - new FullScreenVideoTestAwContentsClient(getActivity()); + public void testOnShowAndHideCustomViewWithCallback() throws Throwable { + doOnShowAndHideCustomViewTest(new Runnable() { + @Override + public void run() { + mContentsClient.getExitCallback().onCustomViewHidden(); + } + }); + } + + @MediumTest + @Feature({"AndroidWebView"}) + public void testOnShowAndHideCustomViewWithBackKey() throws Throwable { + doOnShowAndHideCustomViewTest(new Runnable() { + @Override + public void run() { + ContentVideoView view = mContentsClient.getVideoView(); + view.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK)); + view.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_BACK)); + } + }); + } + + private void doOnShowAndHideCustomViewTest(Runnable existFullscreen) throws Throwable { + mContentsClient = new FullScreenVideoTestAwContentsClient(getActivity()); AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(mContentsClient); enableJavaScriptOnUiThread(testContainerView.getAwContents()); VideoTestWebServer webServer = new VideoTestWebServer( getInstrumentation().getTargetContext()); try { loadUrlSync(testContainerView.getAwContents(), - contentsClient.getOnPageFinishedHelper(), + mContentsClient.getOnPageFinishedHelper(), webServer.getFullScreenVideoTestURL()); Thread.sleep(5 * 1000); + TouchCommon touchCommon = new TouchCommon(this); touchCommon.singleClickView(testContainerView); - contentsClient.waitForCustomViewShown(); - getInstrumentation().sendKeyDownUpSync(KeyEvent.KEYCODE_BACK); - contentsClient.waitForCustomViewHidden(); + mContentsClient.waitForCustomViewShown(); + + getInstrumentation().runOnMainSync(existFullscreen); + mContentsClient.waitForCustomViewHidden(); } finally { if (webServer != null) webServer.getTestWebServer().shutdown(); } diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java index 5b7f86c3cf..6f27291e9d 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java @@ -18,7 +18,6 @@ import org.chromium.android_webview.AwContents; import org.chromium.android_webview.AwSettings; import org.chromium.android_webview.test.TestAwContentsClient.OnDownloadStartHelper; import org.chromium.android_webview.test.util.CommonResources; -import org.chromium.base.test.util.DisabledTest; import org.chromium.base.test.util.Feature; import org.chromium.content.browser.test.util.CallbackHelper; import org.chromium.net.test.util.TestWebServer; @@ -291,9 +290,8 @@ public class AwContentsTest extends AwTestBase { } } - /** Disabled to unblock the waterfall, investigating in http://crbug.com/363563. */ @Feature({"AndroidWebView", "Downloads"}) - @DisabledTest + @SmallTest public void testDownload() throws Throwable { AwTestContainerView testView = createAwTestContainerViewOnMainSync(mContentsClient); AwContents awContents = testView.getAwContents(); 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 6fd74b94d1..16ab9d93c5 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 @@ -6,12 +6,14 @@ package org.chromium.android_webview.test; import android.content.Context; import android.graphics.Point; +import android.net.http.SslError; import android.os.Build; import android.os.SystemClock; import android.test.suitebuilder.annotation.MediumTest; import android.test.suitebuilder.annotation.SmallTest; import android.view.WindowManager; import android.webkit.JavascriptInterface; +import android.webkit.ValueCallback; import android.webkit.WebSettings; import org.apache.http.Header; @@ -2633,6 +2635,61 @@ public class AwSettingsTest extends AwTestBase { } } + @SmallTest + @Feature({"AndroidWebView", "Preferences"}) + public void testAllowMixedMode() throws Throwable { + final TestAwContentsClient contentClient = new TestAwContentsClient() { + @Override + public void onReceivedSslError(ValueCallback<Boolean> callback, SslError error) { + callback.onReceiveValue(true); + } + }; + final AwTestContainerView testContainerView = + createAwTestContainerViewOnMainSync(contentClient); + final AwContents awContents = testContainerView.getAwContents(); + final AwSettings awSettings = getAwSettingsOnUiThread(awContents); + + awSettings.setJavaScriptEnabled(true); + + TestWebServer httpsServer = new TestWebServer(true); + TestWebServer httpServer = new TestWebServer(false); + + final String JS_URL = "/insecure.js"; + final String IMG_URL = "/insecure.png"; + final String SECURE_URL = "/secure.html"; + httpServer.setResponse(JS_URL, "window.loaded_js = 42;", null); + httpServer.setResponseBase64(IMG_URL, CommonResources.FAVICON_DATA_BASE64, null); + + final String JS_HTML = "<script src=\"" + httpServer.getResponseUrl(JS_URL) + + "\"></script>"; + final String IMG_HTML = "<img src=\"" + httpServer.getResponseUrl(IMG_URL) + "\" />"; + final String SECURE_HTML = "<body>" + IMG_HTML + " " + JS_HTML + "</body>"; + + String secureUrl = httpsServer.setResponse(SECURE_URL, SECURE_HTML, null); + + awSettings.setMixedContentMode(AwSettings.MIXED_CONTENT_NEVER_ALLOW); + loadUrlSync(awContents, contentClient.getOnPageFinishedHelper(), secureUrl); + assertEquals(1, httpsServer.getRequestCount(SECURE_URL)); + assertEquals(0, httpServer.getRequestCount(JS_URL)); + assertEquals(0, httpServer.getRequestCount(IMG_URL)); + + awSettings.setMixedContentMode(AwSettings.MIXED_CONTENT_ALWAYS_ALLOW); + loadUrlSync(awContents, contentClient.getOnPageFinishedHelper(), secureUrl); + assertEquals(2, httpsServer.getRequestCount(SECURE_URL)); + assertEquals(1, httpServer.getRequestCount(JS_URL)); + assertEquals(1, httpServer.getRequestCount(IMG_URL)); + + awSettings.setMixedContentMode(AwSettings.MIXED_CONTENT_COMPATIBILITY_MODE); + loadUrlSync(awContents, contentClient.getOnPageFinishedHelper(), secureUrl); + assertEquals(3, httpsServer.getRequestCount(SECURE_URL)); + assertEquals(1, httpServer.getRequestCount(JS_URL)); + assertEquals(2, httpServer.getRequestCount(IMG_URL)); + + httpServer.shutdown(); + httpsServer.shutdown(); + } + + static class ViewPair { private final AwTestContainerView mContainer0; private final TestAwContentsClient mClient0; diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java b/android_webview/javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java index 7973a8da71..2307109bd0 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java @@ -14,6 +14,7 @@ import android.widget.FrameLayout; import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout; +import org.chromium.content.browser.ContentVideoView; import org.chromium.content.browser.test.util.CallbackHelper; import java.util.concurrent.TimeUnit; @@ -28,6 +29,8 @@ public class FullScreenVideoTestAwContentsClient extends TestAwContentsClient { private CallbackHelper mOnHideCustomViewCallbackHelper = new CallbackHelper(); private Activity mActivity; + private ContentVideoView mVideoView; + private WebChromeClient.CustomViewCallback mExitCallback; public FullScreenVideoTestAwContentsClient(Activity activity) { mActivity = activity; @@ -35,6 +38,10 @@ public class FullScreenVideoTestAwContentsClient extends TestAwContentsClient { @Override public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) { + if (view instanceof ContentVideoView) { + mVideoView = (ContentVideoView)view; + } + mExitCallback = callback; mActivity.getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); @@ -53,6 +60,14 @@ public class FullScreenVideoTestAwContentsClient extends TestAwContentsClient { mOnHideCustomViewCallbackHelper.notifyCalled(); } + public WebChromeClient.CustomViewCallback getExitCallback() { + return mExitCallback; + } + + public ContentVideoView getVideoView() { + return mVideoView; + } + public void waitForCustomViewShown() throws TimeoutException, InterruptedException { mOnShowCustomViewCallbackHelper.waitForCallback(0, 1, WAITING_SECONDS, TimeUnit.SECONDS); } diff --git a/android_webview/libwebviewchromium.target.darwin-arm.mk b/android_webview/libwebviewchromium.target.darwin-arm.mk index 908ef6dc85..8eaa82d298 100644 --- a/android_webview/libwebviewchromium.target.darwin-arm.mk +++ b/android_webview/libwebviewchromium.target.darwin-arm.mk @@ -109,12 +109,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_base_ui_base_gyp,,,$(GYP_VAR_PREFIX))/ui_base_ui_base_gyp.a \ $(call intermediates-dir-for,GYP,ui_resources_ui_resources_gyp,,,$(GYP_VAR_PREFIX))/ui_resources.stamp \ $(call intermediates-dir-for,GYP,ui_base_strings_ui_strings_gyp,,,$(GYP_VAR_PREFIX))/ui_strings.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_events_events_gyp,,,$(GYP_VAR_PREFIX))/ui_events_events_gyp.a \ $(call intermediates-dir-for,GYP,ui_base_ui_base_jni_headers_gyp,,,$(GYP_VAR_PREFIX))/ui_base_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_shell_dialogs_shell_dialogs_gyp,,,$(GYP_VAR_PREFIX))/ui_shell_dialogs_shell_dialogs_gyp.a \ $(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_c_lib_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_c_lib_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_implementation_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_implementation_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gl_in_process_context_gyp,,,$(GYP_VAR_PREFIX))/gpu_gl_in_process_context_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_skia_bindings_gpu_skia_bindings_gyp,,,$(GYP_VAR_PREFIX))/gpu_skia_bindings_gpu_skia_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_environment_chromium_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_environment_chromium_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_common_lib_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_common_lib_gyp.a \ @@ -218,6 +218,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_frontend_protocol_sources_gyp,,,$(GYP_VAR_PREFIX))/frontend_protocol_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_console_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_console_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_search_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_search_js.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_devices_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_devices_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_elements_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_elements_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_resources_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_resources_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_network_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_network_js.stamp \ @@ -556,7 +557,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ -Wl,-shared,-Bsymbolic \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -644,10 +644,10 @@ LOCAL_STATIC_LIBRARIES := \ ui_accessibility_ax_gen_gyp \ tools_json_schema_compiler_api_gen_util_gyp \ ui_base_ui_base_gyp \ - ui_events_events_gyp \ ui_shell_dialogs_shell_dialogs_gyp \ gpu_gles2_c_lib_gyp \ gpu_gles2_implementation_gyp \ + gpu_gl_in_process_context_gyp \ gpu_skia_bindings_gpu_skia_bindings_gyp \ mojo_mojo_environment_chromium_gyp \ mojo_mojo_common_lib_gyp \ diff --git a/android_webview/libwebviewchromium.target.darwin-mips.mk b/android_webview/libwebviewchromium.target.darwin-mips.mk index 2a6e69378d..61ab4d495f 100644 --- a/android_webview/libwebviewchromium.target.darwin-mips.mk +++ b/android_webview/libwebviewchromium.target.darwin-mips.mk @@ -108,12 +108,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_base_ui_base_gyp,,,$(GYP_VAR_PREFIX))/ui_base_ui_base_gyp.a \ $(call intermediates-dir-for,GYP,ui_resources_ui_resources_gyp,,,$(GYP_VAR_PREFIX))/ui_resources.stamp \ $(call intermediates-dir-for,GYP,ui_base_strings_ui_strings_gyp,,,$(GYP_VAR_PREFIX))/ui_strings.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_events_events_gyp,,,$(GYP_VAR_PREFIX))/ui_events_events_gyp.a \ $(call intermediates-dir-for,GYP,ui_base_ui_base_jni_headers_gyp,,,$(GYP_VAR_PREFIX))/ui_base_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_shell_dialogs_shell_dialogs_gyp,,,$(GYP_VAR_PREFIX))/ui_shell_dialogs_shell_dialogs_gyp.a \ $(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_c_lib_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_c_lib_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_implementation_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_implementation_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gl_in_process_context_gyp,,,$(GYP_VAR_PREFIX))/gpu_gl_in_process_context_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_skia_bindings_gpu_skia_bindings_gyp,,,$(GYP_VAR_PREFIX))/gpu_skia_bindings_gpu_skia_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_environment_chromium_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_environment_chromium_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_common_lib_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_common_lib_gyp.a \ @@ -215,6 +215,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_frontend_protocol_sources_gyp,,,$(GYP_VAR_PREFIX))/frontend_protocol_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_console_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_console_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_search_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_search_js.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_devices_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_devices_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_elements_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_elements_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_resources_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_resources_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_network_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_network_js.stamp \ @@ -535,7 +536,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,-shared,-Bsymbolic \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -620,10 +620,10 @@ LOCAL_STATIC_LIBRARIES := \ ui_accessibility_ax_gen_gyp \ tools_json_schema_compiler_api_gen_util_gyp \ ui_base_ui_base_gyp \ - ui_events_events_gyp \ ui_shell_dialogs_shell_dialogs_gyp \ gpu_gles2_c_lib_gyp \ gpu_gles2_implementation_gyp \ + gpu_gl_in_process_context_gyp \ gpu_skia_bindings_gpu_skia_bindings_gyp \ mojo_mojo_environment_chromium_gyp \ mojo_mojo_common_lib_gyp \ diff --git a/android_webview/libwebviewchromium.target.darwin-x86.mk b/android_webview/libwebviewchromium.target.darwin-x86.mk index ef36d3f5cc..49bae44293 100644 --- a/android_webview/libwebviewchromium.target.darwin-x86.mk +++ b/android_webview/libwebviewchromium.target.darwin-x86.mk @@ -114,12 +114,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_base_ui_base_gyp,,,$(GYP_VAR_PREFIX))/ui_base_ui_base_gyp.a \ $(call intermediates-dir-for,GYP,ui_resources_ui_resources_gyp,,,$(GYP_VAR_PREFIX))/ui_resources.stamp \ $(call intermediates-dir-for,GYP,ui_base_strings_ui_strings_gyp,,,$(GYP_VAR_PREFIX))/ui_strings.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_events_events_gyp,,,$(GYP_VAR_PREFIX))/ui_events_events_gyp.a \ $(call intermediates-dir-for,GYP,ui_base_ui_base_jni_headers_gyp,,,$(GYP_VAR_PREFIX))/ui_base_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_shell_dialogs_shell_dialogs_gyp,,,$(GYP_VAR_PREFIX))/ui_shell_dialogs_shell_dialogs_gyp.a \ $(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_c_lib_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_c_lib_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_implementation_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_implementation_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gl_in_process_context_gyp,,,$(GYP_VAR_PREFIX))/gpu_gl_in_process_context_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_skia_bindings_gpu_skia_bindings_gyp,,,$(GYP_VAR_PREFIX))/gpu_skia_bindings_gpu_skia_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_environment_chromium_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_environment_chromium_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_common_lib_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_common_lib_gyp.a \ @@ -221,6 +221,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_frontend_protocol_sources_gyp,,,$(GYP_VAR_PREFIX))/frontend_protocol_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_console_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_console_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_search_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_search_js.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_devices_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_devices_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_elements_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_elements_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_resources_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_resources_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_network_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_network_js.stamp \ @@ -554,7 +555,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,-shared,-Bsymbolic \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -645,10 +645,10 @@ LOCAL_STATIC_LIBRARIES := \ ui_accessibility_ax_gen_gyp \ tools_json_schema_compiler_api_gen_util_gyp \ ui_base_ui_base_gyp \ - ui_events_events_gyp \ ui_shell_dialogs_shell_dialogs_gyp \ gpu_gles2_c_lib_gyp \ gpu_gles2_implementation_gyp \ + gpu_gl_in_process_context_gyp \ gpu_skia_bindings_gpu_skia_bindings_gyp \ mojo_mojo_environment_chromium_gyp \ mojo_mojo_common_lib_gyp \ diff --git a/android_webview/libwebviewchromium.target.darwin-x86_64.mk b/android_webview/libwebviewchromium.target.darwin-x86_64.mk index 325f8732c7..e361ac6eaa 100644 --- a/android_webview/libwebviewchromium.target.darwin-x86_64.mk +++ b/android_webview/libwebviewchromium.target.darwin-x86_64.mk @@ -114,12 +114,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_base_ui_base_gyp,,,$(GYP_VAR_PREFIX))/ui_base_ui_base_gyp.a \ $(call intermediates-dir-for,GYP,ui_resources_ui_resources_gyp,,,$(GYP_VAR_PREFIX))/ui_resources.stamp \ $(call intermediates-dir-for,GYP,ui_base_strings_ui_strings_gyp,,,$(GYP_VAR_PREFIX))/ui_strings.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_events_events_gyp,,,$(GYP_VAR_PREFIX))/ui_events_events_gyp.a \ $(call intermediates-dir-for,GYP,ui_base_ui_base_jni_headers_gyp,,,$(GYP_VAR_PREFIX))/ui_base_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_shell_dialogs_shell_dialogs_gyp,,,$(GYP_VAR_PREFIX))/ui_shell_dialogs_shell_dialogs_gyp.a \ $(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_c_lib_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_c_lib_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_implementation_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_implementation_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gl_in_process_context_gyp,,,$(GYP_VAR_PREFIX))/gpu_gl_in_process_context_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_skia_bindings_gpu_skia_bindings_gyp,,,$(GYP_VAR_PREFIX))/gpu_skia_bindings_gpu_skia_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_environment_chromium_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_environment_chromium_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_common_lib_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_common_lib_gyp.a \ @@ -221,6 +221,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_frontend_protocol_sources_gyp,,,$(GYP_VAR_PREFIX))/frontend_protocol_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_console_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_console_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_search_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_search_js.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_devices_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_devices_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_elements_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_elements_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_resources_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_resources_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_network_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_network_js.stamp \ @@ -554,7 +555,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,-shared,-Bsymbolic \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -645,10 +645,10 @@ LOCAL_STATIC_LIBRARIES := \ ui_accessibility_ax_gen_gyp \ tools_json_schema_compiler_api_gen_util_gyp \ ui_base_ui_base_gyp \ - ui_events_events_gyp \ ui_shell_dialogs_shell_dialogs_gyp \ gpu_gles2_c_lib_gyp \ gpu_gles2_implementation_gyp \ + gpu_gl_in_process_context_gyp \ gpu_skia_bindings_gpu_skia_bindings_gyp \ mojo_mojo_environment_chromium_gyp \ mojo_mojo_common_lib_gyp \ diff --git a/android_webview/libwebviewchromium.target.linux-arm.mk b/android_webview/libwebviewchromium.target.linux-arm.mk index 908ef6dc85..8eaa82d298 100644 --- a/android_webview/libwebviewchromium.target.linux-arm.mk +++ b/android_webview/libwebviewchromium.target.linux-arm.mk @@ -109,12 +109,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_base_ui_base_gyp,,,$(GYP_VAR_PREFIX))/ui_base_ui_base_gyp.a \ $(call intermediates-dir-for,GYP,ui_resources_ui_resources_gyp,,,$(GYP_VAR_PREFIX))/ui_resources.stamp \ $(call intermediates-dir-for,GYP,ui_base_strings_ui_strings_gyp,,,$(GYP_VAR_PREFIX))/ui_strings.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_events_events_gyp,,,$(GYP_VAR_PREFIX))/ui_events_events_gyp.a \ $(call intermediates-dir-for,GYP,ui_base_ui_base_jni_headers_gyp,,,$(GYP_VAR_PREFIX))/ui_base_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_shell_dialogs_shell_dialogs_gyp,,,$(GYP_VAR_PREFIX))/ui_shell_dialogs_shell_dialogs_gyp.a \ $(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_c_lib_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_c_lib_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_implementation_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_implementation_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gl_in_process_context_gyp,,,$(GYP_VAR_PREFIX))/gpu_gl_in_process_context_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_skia_bindings_gpu_skia_bindings_gyp,,,$(GYP_VAR_PREFIX))/gpu_skia_bindings_gpu_skia_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_environment_chromium_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_environment_chromium_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_common_lib_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_common_lib_gyp.a \ @@ -218,6 +218,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_frontend_protocol_sources_gyp,,,$(GYP_VAR_PREFIX))/frontend_protocol_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_console_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_console_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_search_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_search_js.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_devices_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_devices_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_elements_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_elements_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_resources_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_resources_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_network_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_network_js.stamp \ @@ -556,7 +557,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ -Wl,-shared,-Bsymbolic \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -644,10 +644,10 @@ LOCAL_STATIC_LIBRARIES := \ ui_accessibility_ax_gen_gyp \ tools_json_schema_compiler_api_gen_util_gyp \ ui_base_ui_base_gyp \ - ui_events_events_gyp \ ui_shell_dialogs_shell_dialogs_gyp \ gpu_gles2_c_lib_gyp \ gpu_gles2_implementation_gyp \ + gpu_gl_in_process_context_gyp \ gpu_skia_bindings_gpu_skia_bindings_gyp \ mojo_mojo_environment_chromium_gyp \ mojo_mojo_common_lib_gyp \ diff --git a/android_webview/libwebviewchromium.target.linux-mips.mk b/android_webview/libwebviewchromium.target.linux-mips.mk index 2a6e69378d..61ab4d495f 100644 --- a/android_webview/libwebviewchromium.target.linux-mips.mk +++ b/android_webview/libwebviewchromium.target.linux-mips.mk @@ -108,12 +108,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_base_ui_base_gyp,,,$(GYP_VAR_PREFIX))/ui_base_ui_base_gyp.a \ $(call intermediates-dir-for,GYP,ui_resources_ui_resources_gyp,,,$(GYP_VAR_PREFIX))/ui_resources.stamp \ $(call intermediates-dir-for,GYP,ui_base_strings_ui_strings_gyp,,,$(GYP_VAR_PREFIX))/ui_strings.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_events_events_gyp,,,$(GYP_VAR_PREFIX))/ui_events_events_gyp.a \ $(call intermediates-dir-for,GYP,ui_base_ui_base_jni_headers_gyp,,,$(GYP_VAR_PREFIX))/ui_base_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_shell_dialogs_shell_dialogs_gyp,,,$(GYP_VAR_PREFIX))/ui_shell_dialogs_shell_dialogs_gyp.a \ $(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_c_lib_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_c_lib_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_implementation_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_implementation_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gl_in_process_context_gyp,,,$(GYP_VAR_PREFIX))/gpu_gl_in_process_context_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_skia_bindings_gpu_skia_bindings_gyp,,,$(GYP_VAR_PREFIX))/gpu_skia_bindings_gpu_skia_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_environment_chromium_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_environment_chromium_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_common_lib_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_common_lib_gyp.a \ @@ -215,6 +215,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_frontend_protocol_sources_gyp,,,$(GYP_VAR_PREFIX))/frontend_protocol_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_console_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_console_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_search_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_search_js.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_devices_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_devices_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_elements_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_elements_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_resources_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_resources_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_network_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_network_js.stamp \ @@ -535,7 +536,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,-shared,-Bsymbolic \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -620,10 +620,10 @@ LOCAL_STATIC_LIBRARIES := \ ui_accessibility_ax_gen_gyp \ tools_json_schema_compiler_api_gen_util_gyp \ ui_base_ui_base_gyp \ - ui_events_events_gyp \ ui_shell_dialogs_shell_dialogs_gyp \ gpu_gles2_c_lib_gyp \ gpu_gles2_implementation_gyp \ + gpu_gl_in_process_context_gyp \ gpu_skia_bindings_gpu_skia_bindings_gyp \ mojo_mojo_environment_chromium_gyp \ mojo_mojo_common_lib_gyp \ diff --git a/android_webview/libwebviewchromium.target.linux-x86.mk b/android_webview/libwebviewchromium.target.linux-x86.mk index ef36d3f5cc..49bae44293 100644 --- a/android_webview/libwebviewchromium.target.linux-x86.mk +++ b/android_webview/libwebviewchromium.target.linux-x86.mk @@ -114,12 +114,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_base_ui_base_gyp,,,$(GYP_VAR_PREFIX))/ui_base_ui_base_gyp.a \ $(call intermediates-dir-for,GYP,ui_resources_ui_resources_gyp,,,$(GYP_VAR_PREFIX))/ui_resources.stamp \ $(call intermediates-dir-for,GYP,ui_base_strings_ui_strings_gyp,,,$(GYP_VAR_PREFIX))/ui_strings.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_events_events_gyp,,,$(GYP_VAR_PREFIX))/ui_events_events_gyp.a \ $(call intermediates-dir-for,GYP,ui_base_ui_base_jni_headers_gyp,,,$(GYP_VAR_PREFIX))/ui_base_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_shell_dialogs_shell_dialogs_gyp,,,$(GYP_VAR_PREFIX))/ui_shell_dialogs_shell_dialogs_gyp.a \ $(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_c_lib_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_c_lib_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_implementation_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_implementation_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gl_in_process_context_gyp,,,$(GYP_VAR_PREFIX))/gpu_gl_in_process_context_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_skia_bindings_gpu_skia_bindings_gyp,,,$(GYP_VAR_PREFIX))/gpu_skia_bindings_gpu_skia_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_environment_chromium_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_environment_chromium_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_common_lib_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_common_lib_gyp.a \ @@ -221,6 +221,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_frontend_protocol_sources_gyp,,,$(GYP_VAR_PREFIX))/frontend_protocol_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_console_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_console_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_search_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_search_js.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_devices_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_devices_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_elements_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_elements_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_resources_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_resources_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_network_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_network_js.stamp \ @@ -554,7 +555,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,-shared,-Bsymbolic \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -645,10 +645,10 @@ LOCAL_STATIC_LIBRARIES := \ ui_accessibility_ax_gen_gyp \ tools_json_schema_compiler_api_gen_util_gyp \ ui_base_ui_base_gyp \ - ui_events_events_gyp \ ui_shell_dialogs_shell_dialogs_gyp \ gpu_gles2_c_lib_gyp \ gpu_gles2_implementation_gyp \ + gpu_gl_in_process_context_gyp \ gpu_skia_bindings_gpu_skia_bindings_gyp \ mojo_mojo_environment_chromium_gyp \ mojo_mojo_common_lib_gyp \ diff --git a/android_webview/libwebviewchromium.target.linux-x86_64.mk b/android_webview/libwebviewchromium.target.linux-x86_64.mk index 325f8732c7..e361ac6eaa 100644 --- a/android_webview/libwebviewchromium.target.linux-x86_64.mk +++ b/android_webview/libwebviewchromium.target.linux-x86_64.mk @@ -114,12 +114,12 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_base_ui_base_gyp,,,$(GYP_VAR_PREFIX))/ui_base_ui_base_gyp.a \ $(call intermediates-dir-for,GYP,ui_resources_ui_resources_gyp,,,$(GYP_VAR_PREFIX))/ui_resources.stamp \ $(call intermediates-dir-for,GYP,ui_base_strings_ui_strings_gyp,,,$(GYP_VAR_PREFIX))/ui_strings.stamp \ - $(call intermediates-dir-for,STATIC_LIBRARIES,ui_events_events_gyp,,,$(GYP_VAR_PREFIX))/ui_events_events_gyp.a \ $(call intermediates-dir-for,GYP,ui_base_ui_base_jni_headers_gyp,,,$(GYP_VAR_PREFIX))/ui_base_jni_headers.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,ui_shell_dialogs_shell_dialogs_gyp,,,$(GYP_VAR_PREFIX))/ui_shell_dialogs_shell_dialogs_gyp.a \ $(call intermediates-dir-for,GYP,content_content_resources_gyp,,,$(GYP_VAR_PREFIX))/content_resources.stamp \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_c_lib_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_c_lib_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gles2_implementation_gyp,,,$(GYP_VAR_PREFIX))/gpu_gles2_implementation_gyp.a \ + $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_gl_in_process_context_gyp,,,$(GYP_VAR_PREFIX))/gpu_gl_in_process_context_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,gpu_skia_bindings_gpu_skia_bindings_gyp,,,$(GYP_VAR_PREFIX))/gpu_skia_bindings_gpu_skia_bindings_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_environment_chromium_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_environment_chromium_gyp.a \ $(call intermediates-dir-for,STATIC_LIBRARIES,mojo_mojo_common_lib_gyp,,,$(GYP_VAR_PREFIX))/mojo_mojo_common_lib_gyp.a \ @@ -221,6 +221,7 @@ GYP_TARGET_DEPENDENCIES := \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_frontend_protocol_sources_gyp,,,$(GYP_VAR_PREFIX))/frontend_protocol_sources.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_console_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_console_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_search_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_search_js.stamp \ + $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_devices_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_devices_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_elements_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_elements_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_resources_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_resources_js.stamp \ $(call intermediates-dir-for,GYP,third_party_WebKit_Source_devtools_concatenated_devtools_network_js_gyp,,,$(GYP_VAR_PREFIX))/concatenated_devtools_network_js.stamp \ @@ -554,7 +555,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,-shared,-Bsymbolic \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed @@ -645,10 +645,10 @@ LOCAL_STATIC_LIBRARIES := \ ui_accessibility_ax_gen_gyp \ tools_json_schema_compiler_api_gen_util_gyp \ ui_base_ui_base_gyp \ - ui_events_events_gyp \ ui_shell_dialogs_shell_dialogs_gyp \ gpu_gles2_c_lib_gyp \ gpu_gles2_implementation_gyp \ + gpu_gl_in_process_context_gyp \ gpu_skia_bindings_gpu_skia_bindings_gyp \ mojo_mojo_environment_chromium_gyp \ mojo_mojo_common_lib_gyp \ diff --git a/android_webview/native/DEPS b/android_webview/native/DEPS index 0c49faff4e..d221dcddfb 100644 --- a/android_webview/native/DEPS +++ b/android_webview/native/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+content/public/browser", + "+content/public/test", "+ui/gfx", "+ui/shell_dialogs", diff --git a/android_webview/native/android_protocol_handler.cc b/android_webview/native/android_protocol_handler.cc index 256aa91cdf..858d0fe16a 100644 --- a/android_webview/native/android_protocol_handler.cc +++ b/android_webview/native/android_protocol_handler.cc @@ -9,8 +9,8 @@ #include "android_webview/common/url_constants.h" #include "android_webview/native/input_stream_impl.h" #include "base/android/jni_android.h" -#include "base/android/jni_helper.h" #include "base/android/jni_string.h" +#include "base/android/jni_weak_ref.h" #include "base/strings/string_util.h" #include "content/public/common/url_constants.h" #include "jni/AndroidProtocolHandler_jni.h" diff --git a/android_webview/native/aw_autofill_manager_delegate.cc b/android_webview/native/aw_autofill_manager_delegate.cc index e1107d6924..070e25e5f7 100644 --- a/android_webview/native/aw_autofill_manager_delegate.cc +++ b/android_webview/native/aw_autofill_manager_delegate.cc @@ -200,7 +200,7 @@ void AwAutofillManagerDelegate::ShowRequestAutocompleteDialog( } bool RegisterAwAutofillManagerDelegate(JNIEnv* env) { - return RegisterNativesImpl(env) >= 0; + return RegisterNativesImpl(env); } } // namespace android_webview diff --git a/android_webview/native/aw_autofill_manager_delegate.h b/android_webview/native/aw_autofill_manager_delegate.h index 18ada0945f..159ff08447 100644 --- a/android_webview/native/aw_autofill_manager_delegate.h +++ b/android_webview/native/aw_autofill_manager_delegate.h @@ -8,7 +8,7 @@ #include <jni.h> #include <vector> -#include "base/android/jni_helper.h" +#include "base/android/jni_weak_ref.h" #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/prefs/pref_registry_simple.h" diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc index bde37b6821..c7b07f8668 100644 --- a/android_webview/native/aw_contents.cc +++ b/android_webview/native/aw_contents.cc @@ -54,6 +54,7 @@ #include "content/public/common/renderer_preferences.h" #include "content/public/common/ssl_status.h" #include "jni/AwContents_jni.h" +#include "net/cert/cert_database.h" #include "net/cert/x509_certificate.h" #include "third_party/skia/include/core/SkPicture.h" #include "ui/base/l10n/l10n_util_android.h" @@ -165,6 +166,11 @@ void OnIoThreadClientReady(content::RenderFrameHost* rfh) { render_process_id, render_frame_id); } +void NotifyClientCertificatesChanged() { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + net::CertDatabase::GetInstance()->OnAndroidKeyStoreChanged(); +} + } // namespace // static @@ -481,7 +487,7 @@ void AwContents::AddVisitedLinks(JNIEnv* env, } bool RegisterAwContents(JNIEnv* env) { - return RegisterNativesImpl(env) >= 0; + return RegisterNativesImpl(env); } namespace { @@ -1038,6 +1044,13 @@ void AwContents::SetExtraHeadersForUrl(JNIEnv* env, jobject obj, extra_headers); } +void AwContents::ClearClientCertPreferences(JNIEnv* env, jobject obj) { + content::BrowserThread::PostTask( + BrowserThread::IO, + FROM_HERE, + base::Bind(&NotifyClientCertificatesChanged)); +} + void AwContents::SetJsOnlineProperty(JNIEnv* env, jobject obj, jboolean network_up) { diff --git a/android_webview/native/aw_contents.h b/android_webview/native/aw_contents.h index acae8938c7..4c37f96bcc 100644 --- a/android_webview/native/aw_contents.h +++ b/android_webview/native/aw_contents.h @@ -16,8 +16,8 @@ #include "android_webview/browser/icon_helper.h" #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" #include "android_webview/browser/shared_renderer_state.h" +#include "base/android/jni_weak_ref.h" #include "base/android/scoped_java_ref.h" -#include "base/android/jni_helper.h" #include "base/callback_forward.h" #include "base/memory/scoped_ptr.h" @@ -129,6 +129,9 @@ class AwContents : public FindHelper::Listener, void DrawGL(AwDrawGLInfo* draw_info); + // TODO(sgurun) test this. + void ClearClientCertPreferences(JNIEnv* env, jobject obj); + // Geolocation API support void ShowGeolocationPrompt(const GURL& origin, base::Callback<void(bool)>); void HideGeolocationPrompt(const GURL& origin); diff --git a/android_webview/native/aw_contents_client_bridge.cc b/android_webview/native/aw_contents_client_bridge.cc index 348505981e..efb5a85163 100644 --- a/android_webview/native/aw_contents_client_bridge.cc +++ b/android_webview/native/aw_contents_client_bridge.cc @@ -8,10 +8,14 @@ #include "base/android/jni_android.h" #include "base/android/jni_array.h" #include "base/android/jni_string.h" -#include "base/callback.h" +#include "base/callback_helpers.h" #include "content/public/browser/browser_thread.h" #include "jni/AwContentsClientBridge_jni.h" +#include "net/android/keystore_openssl.h" #include "net/cert/x509_certificate.h" +#include "net/ssl/openssl_client_key_store.h" +#include "net/ssl/ssl_cert_request_info.h" +#include "net/ssl/ssl_client_cert_type.h" #include "url/gurl.h" using base::android::AttachCurrentThread; @@ -24,6 +28,22 @@ using content::BrowserThread; namespace android_webview { +typedef net::OpenSSLClientKeyStore::ScopedEVP_PKEY ScopedEVP_PKEY; + +namespace { + +// Must be called on the I/O thread to record a client certificate +// and its private key in the OpenSSLClientKeyStore. +void RecordClientCertificateKey( + const scoped_refptr<net::X509Certificate>& client_cert, + ScopedEVP_PKEY private_key) { + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + net::OpenSSLClientKeyStore::GetInstance()->RecordClientCertPrivateKey( + client_cert.get(), private_key.get()); +} + +} // namespace + AwContentsClientBridge::AwContentsClientBridge(JNIEnv* env, jobject obj) : java_ref_(env, obj) { DCHECK(obj); @@ -49,7 +69,7 @@ void AwContentsClientBridge::AllowCertificateError( const base::Callback<void(bool)>& callback, bool* cancel_request) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); JNIEnv* env = AttachCurrentThread(); ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); @@ -73,12 +93,12 @@ void AwContentsClientBridge::AllowCertificateError( // if the request is cancelled, then cancel the stored callback if (*cancel_request) { pending_cert_error_callbacks_.Remove(request_id); - } + } } void AwContentsClientBridge::ProceedSslError(JNIEnv* env, jobject obj, jboolean proceed, jint id) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK_CURRENTLY_ON(BrowserThread::UI); CertErrorCallback* callback = pending_cert_error_callbacks_.Lookup(id); if (!callback || callback->is_null()) { LOG(WARNING) << "Ignoring unexpected ssl error proceed callback"; @@ -88,6 +108,147 @@ void AwContentsClientBridge::ProceedSslError(JNIEnv* env, jobject obj, pending_cert_error_callbacks_.Remove(id); } +// This method is inspired by SelectClientCertificate() in +// chrome/browser/ui/android/ssl_client_certificate_request.cc +void AwContentsClientBridge::SelectClientCertificate( + net::SSLCertRequestInfo* cert_request_info, + const SelectCertificateCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + // Add the callback to id map. + int request_id = pending_client_cert_request_callbacks_.Add( + new SelectCertificateCallback(callback)); + // Make sure callback is run on error. + base::ScopedClosureRunner guard(base::Bind( + &AwContentsClientBridge::HandleErrorInClientCertificateResponse, + base::Unretained(this), + request_id)); + + JNIEnv* env = base::android::AttachCurrentThread(); + ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); + if (obj.is_null()) + return; + + // Build the |key_types| JNI parameter, as a String[] + std::vector<std::string> key_types; + for (size_t i = 0; i < cert_request_info->cert_key_types.size(); ++i) { + switch (cert_request_info->cert_key_types[i]) { + case net::CLIENT_CERT_RSA_SIGN: + key_types.push_back("RSA"); + break; + case net::CLIENT_CERT_DSS_SIGN: + key_types.push_back("DSA"); + break; + case net::CLIENT_CERT_ECDSA_SIGN: + key_types.push_back("ECDSA"); + break; + default: + // Ignore unknown types. + break; + } + } + + ScopedJavaLocalRef<jobjectArray> key_types_ref = + base::android::ToJavaArrayOfStrings(env, key_types); + if (key_types_ref.is_null()) { + LOG(ERROR) << "Could not create key types array (String[])"; + return; + } + + // Build the |encoded_principals| JNI parameter, as a byte[][] + ScopedJavaLocalRef<jobjectArray> principals_ref = + base::android::ToJavaArrayOfByteArray( + env, cert_request_info->cert_authorities); + if (principals_ref.is_null()) { + LOG(ERROR) << "Could not create principals array (byte[][])"; + return; + } + + // Build the |host_name| and |port| JNI parameters, as a String and + // a jint. + ScopedJavaLocalRef<jstring> host_name_ref = + base::android::ConvertUTF8ToJavaString( + env, cert_request_info->host_and_port.host()); + + Java_AwContentsClientBridge_selectClientCertificate( + env, + obj.obj(), + request_id, + key_types_ref.obj(), + principals_ref.obj(), + host_name_ref.obj(), + cert_request_info->host_and_port.port()); + + // Release the guard. + ignore_result(guard.Release()); +} + +// This method is inspired by OnSystemRequestCompletion() in +// chrome/browser/ui/android/ssl_client_certificate_request.cc +void AwContentsClientBridge::ProvideClientCertificateResponse( + JNIEnv* env, + jobject obj, + int request_id, + jobjectArray encoded_chain_ref, + jobject private_key_ref) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + SelectCertificateCallback* callback = + pending_client_cert_request_callbacks_.Lookup(request_id); + DCHECK(callback); + + // Make sure callback is run on error. + base::ScopedClosureRunner guard(base::Bind( + &AwContentsClientBridge::HandleErrorInClientCertificateResponse, + base::Unretained(this), + request_id)); + if (encoded_chain_ref == NULL || private_key_ref == NULL) { + LOG(ERROR) << "Client certificate request cancelled"; + return; + } + // Convert the encoded chain to a vector of strings. + std::vector<std::string> encoded_chain_strings; + if (encoded_chain_ref) { + base::android::JavaArrayOfByteArrayToStringVector( + env, encoded_chain_ref, &encoded_chain_strings); + } + + std::vector<base::StringPiece> encoded_chain; + for (size_t i = 0; i < encoded_chain_strings.size(); ++i) + encoded_chain.push_back(encoded_chain_strings[i]); + + // Create the X509Certificate object from the encoded chain. + scoped_refptr<net::X509Certificate> client_cert( + net::X509Certificate::CreateFromDERCertChain(encoded_chain)); + if (!client_cert.get()) { + LOG(ERROR) << "Could not decode client certificate chain"; + return; + } + + // Create an EVP_PKEY wrapper for the private key JNI reference. + ScopedEVP_PKEY private_key( + net::android::GetOpenSSLPrivateKeyWrapper(private_key_ref)); + if (!private_key.get()) { + LOG(ERROR) << "Could not create OpenSSL wrapper for private key"; + return; + } + + // RecordClientCertificateKey() must be called on the I/O thread, + // before the callback is called with the selected certificate on + // the UI thread. + content::BrowserThread::PostTaskAndReply( + content::BrowserThread::IO, + FROM_HERE, + base::Bind(&RecordClientCertificateKey, + client_cert, + base::Passed(&private_key)), + base::Bind(*callback, client_cert)); + pending_client_cert_request_callbacks_.Remove(request_id); + + // Release the guard. + ignore_result(guard.Release()); +} + void AwContentsClientBridge::RunJavaScriptDialog( content::JavaScriptMessageType message_type, const GURL& origin_url, @@ -206,8 +367,17 @@ void AwContentsClientBridge::CancelJsResult(JNIEnv*, jobject, int id) { pending_js_dialog_callbacks_.Remove(id); } +// Use to cleanup if there is an error in client certificate response. +void AwContentsClientBridge::HandleErrorInClientCertificateResponse( + int request_id) { + SelectCertificateCallback* callback = + pending_client_cert_request_callbacks_.Lookup(request_id); + callback->Run(scoped_refptr<net::X509Certificate>()); + pending_client_cert_request_callbacks_.Remove(request_id); +} + bool RegisterAwContentsClientBridge(JNIEnv* env) { - return RegisterNativesImpl(env) >= 0; + return RegisterNativesImpl(env); } } // namespace android_webview diff --git a/android_webview/native/aw_contents_client_bridge.h b/android_webview/native/aw_contents_client_bridge.h index 4cd6c6caa1..3c97f333b9 100644 --- a/android_webview/native/aw_contents_client_bridge.h +++ b/android_webview/native/aw_contents_client_bridge.h @@ -8,7 +8,7 @@ #include <jni.h> #include "android_webview/browser/aw_contents_client_bridge_base.h" -#include "base/android/jni_helper.h" +#include "base/android/jni_weak_ref.h" #include "base/android/scoped_java_ref.h" #include "base/callback.h" #include "base/id_map.h" @@ -29,7 +29,6 @@ namespace android_webview { // any references. class AwContentsClientBridge : public AwContentsClientBridgeBase { public: - AwContentsClientBridge(JNIEnv* env, jobject obj); virtual ~AwContentsClientBridge(); @@ -39,6 +38,9 @@ class AwContentsClientBridge : public AwContentsClientBridgeBase { const GURL& request_url, const base::Callback<void(bool)>& callback, bool* cancel_request) OVERRIDE; + virtual void SelectClientCertificate( + net::SSLCertRequestInfo* cert_request_info, + const SelectCertificateCallback& callback) OVERRIDE; virtual void RunJavaScriptDialog( content::JavaScriptMessageType message_type, @@ -56,16 +58,23 @@ class AwContentsClientBridge : public AwContentsClientBridgeBase { // Methods called from Java. void ProceedSslError(JNIEnv* env, jobject obj, jboolean proceed, jint id); + void ProvideClientCertificateResponse(JNIEnv* env, jobject object, + jint request_id, jobjectArray encoded_chain_ref, + jobject private_key_ref); void ConfirmJsResult(JNIEnv*, jobject, int id, jstring prompt); void CancelJsResult(JNIEnv*, jobject, int id); private: + void HandleErrorInClientCertificateResponse(int id); + JavaObjectWeakGlobalRef java_ref_; typedef const base::Callback<void(bool)> CertErrorCallback; IDMap<CertErrorCallback, IDMapOwnPointer> pending_cert_error_callbacks_; IDMap<content::JavaScriptDialogManager::DialogClosedCallback, IDMapOwnPointer> pending_js_dialog_callbacks_; + IDMap<SelectCertificateCallback, IDMapOwnPointer> + pending_client_cert_request_callbacks_; }; bool RegisterAwContentsClientBridge(JNIEnv* env); diff --git a/android_webview/native/aw_contents_client_bridge_unittest.cc b/android_webview/native/aw_contents_client_bridge_unittest.cc new file mode 100644 index 0000000000..e6714bb7d0 --- /dev/null +++ b/android_webview/native/aw_contents_client_bridge_unittest.cc @@ -0,0 +1,152 @@ +// Copyright 2014 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/native/aw_contents_client_bridge.h" + +#include "base/android/jni_android.h" +#include "base/android/jni_array.h" +#include "base/android/scoped_java_ref.h" +#include "base/bind.h" +#include "base/memory/scoped_ptr.h" +#include "base/run_loop.h" +#include "content/public/test/test_browser_thread_bundle.h" +#include "jni/MockAwContentsClientBridge_jni.h" +#include "net/android/net_jni_registrar.h" +#include "net/ssl/ssl_cert_request_info.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + + +using base::android::AttachCurrentThread; +using base::android::ScopedJavaLocalRef; +using net::SSLCertRequestInfo; +using net::SSLClientCertType; +using net::X509Certificate; +using testing::NotNull; +using testing::Test; + +namespace android_webview { + +namespace { + +// Tests the android_webview contents client bridge. +class AwContentsClientBridgeTest : public Test { + public: + typedef AwContentsClientBridge::SelectCertificateCallback + SelectCertificateCallback; + + AwContentsClientBridgeTest() { } + + // Callback method called when a cert is selected. + void CertSelected(X509Certificate* cert); + protected: + virtual void SetUp(); + void TestCertType(SSLClientCertType type, const std::string& expected_name); + // Create the TestBrowserThreads. Just instantiate the member variable. + content::TestBrowserThreadBundle thread_bundle_; + base::android::ScopedJavaGlobalRef<jobject> jbridge_; + scoped_ptr<AwContentsClientBridge> bridge_; + scoped_refptr<SSLCertRequestInfo> cert_request_info_; + X509Certificate* selected_cert_; + int cert_selected_callbacks_; + JNIEnv* env_; +}; + +} // namespace + +void AwContentsClientBridgeTest::SetUp() { + env_ = AttachCurrentThread(); + ASSERT_THAT(env_, NotNull()); + ASSERT_TRUE(android_webview::RegisterAwContentsClientBridge(env_)); + ASSERT_TRUE(RegisterNativesImpl(env_)); + ASSERT_TRUE(net::android::RegisterJni(env_)); + jbridge_.Reset(env_, + Java_MockAwContentsClientBridge_getAwContentsClientBridge(env_).obj()); + bridge_.reset(new AwContentsClientBridge(env_, jbridge_.obj())); + selected_cert_ = NULL; + cert_selected_callbacks_ = 0; + cert_request_info_ = new net::SSLCertRequestInfo; +} + +void AwContentsClientBridgeTest::CertSelected(X509Certificate* cert) { + selected_cert_ = cert; + cert_selected_callbacks_++; +} + +TEST_F(AwContentsClientBridgeTest, TestClientCertKeyTypesCorrectlyEncoded) { + SSLClientCertType cert_types[3] = {net::CLIENT_CERT_RSA_SIGN, + net::CLIENT_CERT_DSS_SIGN, net::CLIENT_CERT_ECDSA_SIGN}; + std::string expected_names[3] = {"RSA", "DSA" ,"ECDSA"}; + + for(int i = 0; i < 3; i++) { + TestCertType(cert_types[i], expected_names[i]); + } +} + +void AwContentsClientBridgeTest::TestCertType(SSLClientCertType type, + const std::string& expected_name) { + cert_request_info_->cert_key_types.clear(); + cert_request_info_->cert_key_types.push_back(type); + bridge_->SelectClientCertificate( + cert_request_info_.get(), + base::Bind( + &AwContentsClientBridgeTest::CertSelected, + base::Unretained(static_cast<AwContentsClientBridgeTest*>(this)))); + base::RunLoop().RunUntilIdle(); + EXPECT_EQ(0, cert_selected_callbacks_); + ScopedJavaLocalRef<jobjectArray> key_types = + Java_MockAwContentsClientBridge_getKeyTypes(env_, jbridge_.obj()); + std::vector<std::string> vec; + base::android::AppendJavaStringArrayToStringVector(env_, + key_types.obj(), + &vec); + EXPECT_EQ(1u, vec.size()); + EXPECT_EQ(expected_name, vec[0]); +} + +// Verify that ProvideClientCertificateResponse works properly when the client +// responds with a null key. +TEST_F(AwContentsClientBridgeTest, + TestProvideClientCertificateResponseCallsCallbackOnNullKey) { + // Call SelectClientCertificate to create a callback id that mock java object + // can call on. + bridge_->SelectClientCertificate( + cert_request_info_.get(), + base::Bind( + &AwContentsClientBridgeTest::CertSelected, + base::Unretained(static_cast<AwContentsClientBridgeTest*>(this)))); + bridge_->ProvideClientCertificateResponse(env_, jbridge_.obj(), + Java_MockAwContentsClientBridge_getRequestId(env_, jbridge_.obj()), + Java_MockAwContentsClientBridge_createTestCertChain( + env_, jbridge_.obj()).obj(), + NULL); + base::RunLoop().RunUntilIdle(); + EXPECT_EQ(NULL, selected_cert_); + EXPECT_EQ(1, cert_selected_callbacks_); +} + +// Verify that ProvideClientCertificateResponse calls the callback with +// NULL parameters when private key is not provided. +TEST_F(AwContentsClientBridgeTest, + TestProvideClientCertificateResponseCallsCallbackOnNullChain) { + // Call SelectClientCertificate to create a callback id that mock java object + // can call on. + bridge_->SelectClientCertificate( + cert_request_info_.get(), + base::Bind( + &AwContentsClientBridgeTest::CertSelected, + base::Unretained(static_cast<AwContentsClientBridgeTest*>(this)))); + int requestId = + Java_MockAwContentsClientBridge_getRequestId(env_, jbridge_.obj()); + bridge_->ProvideClientCertificateResponse(env_, jbridge_.obj(), + requestId, + NULL, + Java_MockAwContentsClientBridge_createTestPrivateKey( + env_, jbridge_.obj()).obj()); + base::RunLoop().RunUntilIdle(); + EXPECT_EQ(NULL, selected_cert_); + EXPECT_EQ(1, cert_selected_callbacks_); +} + +} // android_webview 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 3d16a433e2..c863971242 100644 --- a/android_webview/native/aw_contents_io_thread_client_impl.cc +++ b/android_webview/native/aw_contents_io_thread_client_impl.cc @@ -9,8 +9,8 @@ #include "android_webview/common/devtools_instrumentation.h" #include "android_webview/native/intercepted_request_data_impl.h" -#include "base/android/jni_helper.h" #include "base/android/jni_string.h" +#include "base/android/jni_weak_ref.h" #include "base/lazy_instance.h" #include "base/memory/linked_ptr.h" #include "base/memory/scoped_ptr.h" diff --git a/android_webview/native/aw_form_database.cc b/android_webview/native/aw_form_database.cc index 851340e265..2269d76ecb 100644 --- a/android_webview/native/aw_form_database.cc +++ b/android_webview/native/aw_form_database.cc @@ -36,7 +36,7 @@ void ClearFormData(JNIEnv*, jclass) { } bool RegisterAwFormDatabase(JNIEnv* env) { - return RegisterNativesImpl(env) >= 0; + return RegisterNativesImpl(env); } } // namespace android_webview diff --git a/android_webview/native/aw_http_auth_handler.cc b/android_webview/native/aw_http_auth_handler.cc index 8146eaeda8..0c4fd92776 100644 --- a/android_webview/native/aw_http_auth_handler.cc +++ b/android_webview/native/aw_http_auth_handler.cc @@ -74,7 +74,7 @@ AwHttpAuthHandlerBase* AwHttpAuthHandlerBase::Create( } bool RegisterAwHttpAuthHandler(JNIEnv* env) { - return RegisterNativesImpl(env) >= 0; + return RegisterNativesImpl(env); } } // namespace android_webview diff --git a/android_webview/native/aw_pdf_exporter.cc b/android_webview/native/aw_pdf_exporter.cc index 7a13fd77a2..8da47a0733 100644 --- a/android_webview/native/aw_pdf_exporter.cc +++ b/android_webview/native/aw_pdf_exporter.cc @@ -111,7 +111,7 @@ bool AwPdfExporter::IsCancelled() { } bool RegisterAwPdfExporter(JNIEnv* env) { - return RegisterNativesImpl(env) >= 0; + return RegisterNativesImpl(env); } } // namespace android_webview diff --git a/android_webview/native/aw_pdf_exporter.h b/android_webview/native/aw_pdf_exporter.h index c8795fcea8..d27b092045 100644 --- a/android_webview/native/aw_pdf_exporter.h +++ b/android_webview/native/aw_pdf_exporter.h @@ -8,7 +8,7 @@ #include <jni.h> #include "android_webview/browser/renderer_host/print_manager.h" -#include "base/android/jni_helper.h" +#include "base/android/jni_weak_ref.h" #include "base/android/scoped_java_ref.h" #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" diff --git a/android_webview/native/aw_picture.cc b/android_webview/native/aw_picture.cc index 9a7ff832ca..535908dc98 100644 --- a/android_webview/native/aw_picture.cc +++ b/android_webview/native/aw_picture.cc @@ -50,7 +50,7 @@ void AwPicture::Draw(JNIEnv* env, jobject obj, jobject canvas, } bool RegisterAwPicture(JNIEnv* env) { - return RegisterNativesImpl(env) >= 0; + return RegisterNativesImpl(env); } } // namespace android_webview diff --git a/android_webview/native/aw_picture.h b/android_webview/native/aw_picture.h index 2cbb5b793f..b1e31ee53b 100644 --- a/android_webview/native/aw_picture.h +++ b/android_webview/native/aw_picture.h @@ -7,7 +7,7 @@ #include <jni.h> -#include "base/android/jni_helper.h" +#include "base/android/jni_weak_ref.h" #include "base/android/scoped_java_ref.h" #include "base/memory/scoped_ptr.h" #include "content/public/browser/web_contents_observer.h" diff --git a/android_webview/native/aw_quota_manager_bridge_impl.cc b/android_webview/native/aw_quota_manager_bridge_impl.cc index 4821732546..b066f35505 100644 --- a/android_webview/native/aw_quota_manager_bridge_impl.cc +++ b/android_webview/native/aw_quota_manager_bridge_impl.cc @@ -350,7 +350,7 @@ void AwQuotaManagerBridgeImpl::QuotaUsageCallbackImpl( } bool RegisterAwQuotaManagerBridge(JNIEnv* env) { - return RegisterNativesImpl(env) >= 0; + return RegisterNativesImpl(env); } } // namespace android_webview diff --git a/android_webview/native/aw_quota_manager_bridge_impl.h b/android_webview/native/aw_quota_manager_bridge_impl.h index c0158ed167..f6aacc36ab 100644 --- a/android_webview/native/aw_quota_manager_bridge_impl.h +++ b/android_webview/native/aw_quota_manager_bridge_impl.h @@ -10,7 +10,7 @@ #include <vector> #include "android_webview/browser/aw_quota_manager_bridge.h" -#include "base/android/jni_helper.h" +#include "base/android/jni_weak_ref.h" #include "base/basictypes.h" #include "base/callback.h" #include "base/memory/ref_counted.h" diff --git a/android_webview/native/aw_resource.cc b/android_webview/native/aw_resource.cc index b110731362..cf4b6f4ca1 100644 --- a/android_webview/native/aw_resource.cc +++ b/android_webview/native/aw_resource.cc @@ -38,7 +38,7 @@ std::string GetDefaultTextEncoding() { } bool RegisterAwResource(JNIEnv* env) { - return RegisterNativesImpl(env) >= 0; + return RegisterNativesImpl(env); } } // namespace AwResource diff --git a/android_webview/native/aw_settings.cc b/android_webview/native/aw_settings.cc index cf66d4e85e..8f54f7a0d8 100644 --- a/android_webview/native/aw_settings.cc +++ b/android_webview/native/aw_settings.cc @@ -336,6 +336,11 @@ void AwSettings::PopulateWebPreferencesLocked( // Using 100M instead of max int to avoid overflows. web_prefs->minimum_accelerated_2d_canvas_size = 100 * 1000 * 1000; } + + web_prefs->allow_displaying_insecure_content = + Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj); + web_prefs->allow_running_insecure_content = + Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); } static jlong Init(JNIEnv* env, @@ -350,7 +355,7 @@ static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) { } bool RegisterAwSettings(JNIEnv* env) { - return RegisterNativesImpl(env) >= 0; + return RegisterNativesImpl(env); } } // namespace android_webview diff --git a/android_webview/native/aw_settings.h b/android_webview/native/aw_settings.h index 632862eb37..2f26622562 100644 --- a/android_webview/native/aw_settings.h +++ b/android_webview/native/aw_settings.h @@ -7,7 +7,7 @@ #include <jni.h> -#include "base/android/jni_helper.h" +#include "base/android/jni_weak_ref.h" #include "base/android/scoped_java_ref.h" #include "base/memory/scoped_ptr.h" #include "content/public/browser/web_contents_observer.h" diff --git a/android_webview/native/external_video_surface_container_impl.cc b/android_webview/native/external_video_surface_container_impl.cc index ca9ed3419b..1a10ab547a 100644 --- a/android_webview/native/external_video_surface_container_impl.cc +++ b/android_webview/native/external_video_surface_container_impl.cc @@ -85,7 +85,7 @@ void ExternalVideoSurfaceContainerImpl::SurfaceDestroyed( } bool RegisterExternalVideoSurfaceContainer(JNIEnv* env) { - return RegisterNativesImpl(env) >= 0; + return RegisterNativesImpl(env); } } // namespace android_webview diff --git a/android_webview/native/java_browser_view_renderer_helper.cc b/android_webview/native/java_browser_view_renderer_helper.cc index ec2866f9a9..df4f433d3e 100644 --- a/android_webview/native/java_browser_view_renderer_helper.cc +++ b/android_webview/native/java_browser_view_renderer_helper.cc @@ -130,7 +130,7 @@ bool JavaBrowserViewRendererHelper::RenderViaAuxilaryBitmap( } bool RegisterJavaBrowserViewRendererHelper(JNIEnv* env) { - return RegisterNativesImpl(env) >= 0; + return RegisterNativesImpl(env); } bool JavaBrowserViewRendererHelper::RasterizeIntoBitmap( diff --git a/android_webview/native/webview_native.gyp b/android_webview/native/webview_native.gyp index 27d599a796..9a1761bf0c 100644 --- a/android_webview/native/webview_native.gyp +++ b/android_webview/native/webview_native.gyp @@ -24,6 +24,7 @@ '../../webkit/common/webkit_common.gyp:webkit_common', '../../webkit/storage_browser.gyp:webkit_storage_browser', '../../webkit/storage_common.gyp:webkit_storage_common', + '../../third_party/openssl/openssl.gyp:openssl', 'android_webview_native_jni', ], 'include_dirs': [ diff --git a/android_webview/native/webview_native.target.darwin-arm.mk b/android_webview/native/webview_native.target.darwin-arm.mk index f9e9263054..b115039c5a 100644 --- a/android_webview/native/webview_native.target.darwin-arm.mk +++ b/android_webview/native/webview_native.target.darwin-arm.mk @@ -119,12 +119,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -165,6 +168,7 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -246,12 +250,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -293,6 +300,7 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -329,7 +337,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/native/webview_native.target.darwin-mips.mk b/android_webview/native/webview_native.target.darwin-mips.mk index 5866b57f43..ee49b97e53 100644 --- a/android_webview/native/webview_native.target.darwin-mips.mk +++ b/android_webview/native/webview_native.target.darwin-mips.mk @@ -118,12 +118,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -164,6 +167,7 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -244,12 +248,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -291,6 +298,7 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -325,7 +333,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/native/webview_native.target.darwin-x86.mk b/android_webview/native/webview_native.target.darwin-x86.mk index eece5b02db..44b72adafb 100644 --- a/android_webview/native/webview_native.target.darwin-x86.mk +++ b/android_webview/native/webview_native.target.darwin-x86.mk @@ -119,12 +119,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -165,6 +168,7 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -245,12 +249,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -292,6 +299,7 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -325,7 +333,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/native/webview_native.target.darwin-x86_64.mk b/android_webview/native/webview_native.target.darwin-x86_64.mk index f4caa9d039..6601e01931 100644 --- a/android_webview/native/webview_native.target.darwin-x86_64.mk +++ b/android_webview/native/webview_native.target.darwin-x86_64.mk @@ -120,12 +120,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -166,6 +169,8 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/config/x64 \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -247,12 +252,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -294,6 +302,8 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/config/x64 \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -327,7 +337,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/native/webview_native.target.linux-arm.mk b/android_webview/native/webview_native.target.linux-arm.mk index f9e9263054..b115039c5a 100644 --- a/android_webview/native/webview_native.target.linux-arm.mk +++ b/android_webview/native/webview_native.target.linux-arm.mk @@ -119,12 +119,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -165,6 +168,7 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -246,12 +250,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -293,6 +300,7 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -329,7 +337,6 @@ LOCAL_LDFLAGS_Debug := \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ -Wl,--icf=safe \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/native/webview_native.target.linux-mips.mk b/android_webview/native/webview_native.target.linux-mips.mk index 5866b57f43..ee49b97e53 100644 --- a/android_webview/native/webview_native.target.linux-mips.mk +++ b/android_webview/native/webview_native.target.linux-mips.mk @@ -118,12 +118,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -164,6 +167,7 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -244,12 +248,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -291,6 +298,7 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -325,7 +333,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/native/webview_native.target.linux-x86.mk b/android_webview/native/webview_native.target.linux-x86.mk index eece5b02db..44b72adafb 100644 --- a/android_webview/native/webview_native.target.linux-x86.mk +++ b/android_webview/native/webview_native.target.linux-x86.mk @@ -119,12 +119,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -165,6 +168,7 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -245,12 +249,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -292,6 +299,7 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -325,7 +333,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/native/webview_native.target.linux-x86_64.mk b/android_webview/native/webview_native.target.linux-x86_64.mk index f4caa9d039..6601e01931 100644 --- a/android_webview/native/webview_native.target.linux-x86_64.mk +++ b/android_webview/native/webview_native.target.linux-x86_64.mk @@ -120,12 +120,15 @@ MY_DEFS_Debug := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -166,6 +169,8 @@ LOCAL_C_INCLUDES_Debug := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/config/x64 \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -247,12 +252,15 @@ MY_DEFS_Release := \ '-DSK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS=1' \ '-DSK_SUPPORT_LEGACY_GETTOPDEVICE' \ '-DSK_SUPPORT_LEGACY_PICTURE_CAN_RECORD' \ + '-DSK_SUPPORT_DEPRECATED_RECORD_FLAGS' \ + '-DSK_SUPPORT_LEGACY_DERIVED_PICTURE_CLASSES' \ '-DSK_SUPPORT_LEGACY_N32_NAME' \ + '-DSK_SUPPORT_LEGACY_PROCXFERMODE' \ + '-DSK_SUPPORT_LEGACY_PICTURE_HEADERS' \ '-DSK_SUPPORT_LEGACY_GETTOTALCLIP' \ '-DSK_BUILD_FOR_ANDROID' \ '-DSK_USE_POSIX_THREADS' \ '-DSK_DEFERRED_CANVAS_USES_FACTORIES=1' \ - '-DSK_IGNORE_FREETYPE_ROTATION_FIX' \ '-DU_USING_ICU_NAMESPACE=0' \ '-DAPPCACHE_USE_SIMPLE_CACHE' \ '-DUSE_OPENSSL=1' \ @@ -294,6 +302,8 @@ LOCAL_C_INCLUDES_Release := \ $(LOCAL_PATH)/skia/ext \ $(PWD)/external/icu4c/common \ $(PWD)/external/icu4c/i18n \ + $(LOCAL_PATH)/third_party/openssl/config/x64 \ + $(LOCAL_PATH)/third_party/openssl/openssl/include \ $(gyp_shared_intermediate_dir)/android_webview \ $(PWD)/frameworks/wilhelm/include \ $(PWD)/bionic \ @@ -327,7 +337,6 @@ LOCAL_LDFLAGS_Debug := \ -nostdlib \ -Wl,--no-undefined \ -Wl,--exclude-libs=ALL \ - -Wl,--gc-sections \ -Wl,--warn-shared-textrel \ -Wl,-O1 \ -Wl,--as-needed diff --git a/android_webview/renderer/aw_key_systems.cc b/android_webview/renderer/aw_key_systems.cc index dc61bf9342..ec976f0cc4 100644 --- a/android_webview/renderer/aw_key_systems.cc +++ b/android_webview/renderer/aw_key_systems.cc @@ -8,7 +8,6 @@ #include "base/command_line.h" #include "base/logging.h" -#include "base/strings/string_split.h" #include "third_party/widevine/cdm/widevine_cdm_common.h" using content::KeySystemInfo; @@ -18,7 +17,8 @@ namespace { const char kAudioMp4[] = "audio/mp4"; const char kVideoMp4[] = "video/mp4"; const char kMp4a[] = "mp4a"; -const char kMp4aAvc1Avc3[] = "mp4a,avc1,avc3"; +const char kAvc1[] = "avc1"; +const char kAvc3[] = "avc3"; // Return |name|'s parent key system. std::string GetDirectParentName(const std::string& name) { @@ -35,8 +35,10 @@ void AddWidevineWithCodecs(const std::string& key_system_name, if (add_parent_name) info.parent_key_system = GetDirectParentName(key_system_name); - info.supported_types.push_back(std::make_pair(kAudioMp4, kMp4a)); - info.supported_types.push_back(std::make_pair(kVideoMp4, kMp4aAvc1Avc3)); + info.supported_types[kAudioMp4].insert(kMp4a); + info.supported_types[kVideoMp4] = info.supported_types[kAudioMp4]; + info.supported_types[kVideoMp4].insert(kAvc1); + info.supported_types[kVideoMp4].insert(kAvc3); concrete_key_systems->push_back(info); } diff --git a/android_webview/renderer/print_web_view_helper.cc b/android_webview/renderer/print_web_view_helper.cc index 6179a3100d..006a37107d 100644 --- a/android_webview/renderer/print_web_view_helper.cc +++ b/android_webview/renderer/print_web_view_helper.cc @@ -32,8 +32,8 @@ #include "third_party/WebKit/public/web/WebConsoleMessage.h" #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebElement.h" -#include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebFrameClient.h" +#include "third_party/WebKit/public/web/WebLocalFrame.h" #include "third_party/WebKit/public/web/WebPlugin.h" #include "third_party/WebKit/public/web/WebPluginDocument.h" #include "third_party/WebKit/public/web/WebPrintParams.h" @@ -537,6 +537,11 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient, return owns_web_view_ && frame() && frame()->isLoading(); } + // TODO(ojan): Remove this override and have this class use a non-null + // layerTreeView. + // blink::WebViewClient override: + virtual bool allowsBrokenNullLayerTreeView() const; + protected: // blink::WebViewClient override: virtual void didStopLoading(); @@ -671,6 +676,10 @@ void PrepareFrameAndViewForPrint::CopySelection( frame()->loadRequest(blink::WebURLRequest(GURL(url_str))); } +bool PrepareFrameAndViewForPrint::allowsBrokenNullLayerTreeView() const { + return true; +} + void PrepareFrameAndViewForPrint::didStopLoading() { DCHECK(!on_ready_.is_null()); // Don't call callback here, because it can delete |this| and WebView that is diff --git a/android_webview/renderer/print_web_view_helper_linux.cc b/android_webview/renderer/print_web_view_helper_linux.cc index 97bcf5dc6c..b84b68d8b7 100644 --- a/android_webview/renderer/print_web_view_helper_linux.cc +++ b/android_webview/renderer/print_web_view_helper_linux.cc @@ -16,7 +16,7 @@ #include "printing/page_size_margins.h" #include "skia/ext/platform_device.h" #include "skia/ext/vector_canvas.h" -#include "third_party/WebKit/public/web/WebFrame.h" +#include "third_party/WebKit/public/web/WebLocalFrame.h" #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) #include "base/process/process_handle.h" diff --git a/android_webview/test/shell/src/org/chromium/android_webview/test/NullContentsClient.java b/android_webview/test/shell/src/org/chromium/android_webview/test/NullContentsClient.java index 34e6ca5153..353250cd5a 100644 --- a/android_webview/test/shell/src/org/chromium/android_webview/test/NullContentsClient.java +++ b/android_webview/test/shell/src/org/chromium/android_webview/test/NullContentsClient.java @@ -9,6 +9,7 @@ import android.graphics.Picture; import android.net.http.SslError; import android.os.Looper; import android.os.Message; +import android.util.Log; import android.view.KeyEvent; import android.view.View; import android.webkit.ConsoleMessage; @@ -17,17 +18,23 @@ import android.webkit.ValueCallback; import android.webkit.WebChromeClient; import org.chromium.android_webview.AwContentsClient; +import org.chromium.android_webview.AwContentsClientBridge; import org.chromium.android_webview.AwHttpAuthHandler; import org.chromium.android_webview.InterceptedRequestData; import org.chromium.android_webview.JsPromptResultReceiver; import org.chromium.android_webview.JsResultReceiver; import org.chromium.base.ThreadUtils; +import java.security.Principal; + /** * As a convience for tests that only care about specefic callbacks, this class provides * empty implementations of all abstract methods. */ public class NullContentsClient extends AwContentsClient { + + private static final String TAG = "NullContentsClient"; + public NullContentsClient() { this(ThreadUtils.getUiThreadLooper()); } @@ -87,6 +94,14 @@ public class NullContentsClient extends AwContentsClient { } @Override + public void onReceivedClientCertRequest( + final AwContentsClientBridge.ClientCertificateRequestCallback callback, + final String[] keyTypes, final Principal[] principals, final String host, + final int port) { + callback.proceed(null, null); + } + + @Override public void onReceivedLoginRequest(String realm, String account, String args) { } @@ -101,19 +116,27 @@ public class NullContentsClient extends AwContentsClient { @Override public void handleJsAlert(String url, String message, JsResultReceiver receiver) { + Log.i(TAG, "handleJsAlert(" + url + ", " + message + ")"); + receiver.cancel(); } @Override public void handleJsBeforeUnload(String url, String message, JsResultReceiver receiver) { + Log.i(TAG, "handleJsBeforeUnload(" + url + ", " + message + ")"); + receiver.confirm(); } @Override public void handleJsConfirm(String url, String message, JsResultReceiver receiver) { + Log.i(TAG, "handleJsConfirm(" + url + ", " + message + ")"); + receiver.cancel(); } @Override public void handleJsPrompt( String url, String message, String defaultValue, JsPromptResultReceiver receiver) { + Log.i(TAG, "handleJsPrompt(" + url + ", " + message + ")"); + receiver.cancel(); } @Override diff --git a/android_webview/tools/third_party_files_whitelist.txt b/android_webview/tools/third_party_files_whitelist.txt index d07e4da7ea..6259ad3173 100644 --- a/android_webview/tools/third_party_files_whitelist.txt +++ b/android_webview/tools/third_party_files_whitelist.txt @@ -41,8 +41,6 @@ chrome/browser/resources/file_manager/foreground/js/main_scripts.js # String 'copyright' used in code. chrome/browser/resources/file_manager/foreground/js/media/mediaplayer_scripts.js # String 'copyright' used in code. -chrome/browser/resources/video_player/js/video_player_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. @@ -72,6 +70,12 @@ content/renderer/history_controller.h # Copyright Apple Inc, Nokia Corporation and Torch Mobile Inc; BSD license. # Moved from third_party/WebKit/. content/renderer/history_controller.cc +# Copyright Apple Inc and Torch Mobile Inc; BSD license. Moved from +# third_party/WebKit/. +content/renderer/history_entry.h +# Copyright Apple Inc, Nokia Corporation and Torch Mobile Inc; BSD license. +# Moved from third_party/WebKit/. +content/renderer/history_entry.cc # Copyright Google Inc, no license. Not used on Android. google_update/google_update_idl.idl # Native client not used in Android. Contains the word "Copyright" @@ -164,6 +168,10 @@ ui/base/dragdrop/os_exchange_data_provider_win.cc # third-party code is taken from WebKit, the license for which we already pick # up from webkit/. ui/events/keycodes/keyboard_codes_posix.h +# String 'copyright' used in code. +ui/file_manager/gallery/js/gallery_scripts.js +# String 'copyright' used in code. +ui/file_manager/video_player/js/video_player_scripts.js # This third-party code is taken from Mozilla, but is copyright Google and has # been re-licensed under the Chromium license. ui/gfx/codec/jpeg_codec.cc diff --git a/android_webview/unittestjava/src/org/chromium/android_webview/unittest/MockAwContentsClientBridge.java b/android_webview/unittestjava/src/org/chromium/android_webview/unittest/MockAwContentsClientBridge.java new file mode 100644 index 0000000000..5c4238d624 --- /dev/null +++ b/android_webview/unittestjava/src/org/chromium/android_webview/unittest/MockAwContentsClientBridge.java @@ -0,0 +1,59 @@ +// Copyright 2014 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.unittest; + +import org.chromium.android_webview.AwContentsClientBridge; +import org.chromium.android_webview.ClientCertLookupTable; +import org.chromium.base.CalledByNative; +import org.chromium.net.AndroidKeyStore; +import org.chromium.net.AndroidPrivateKey; +import org.chromium.net.DefaultAndroidKeyStore; + +class MockAwContentsClientBridge extends AwContentsClientBridge { + + private int mId; + private String[] mKeyTypes; + + public MockAwContentsClientBridge() { + super(new DefaultAndroidKeyStore(), new ClientCertLookupTable()); + } + + @Override + protected void selectClientCertificate(final int id, final String[] keyTypes, + byte[][] encodedPrincipals, final String host, final int port) { + mId = id; + mKeyTypes = keyTypes; + } + + @CalledByNative + private static MockAwContentsClientBridge getAwContentsClientBridge() { + return new MockAwContentsClientBridge(); + } + + @CalledByNative + private String[] getKeyTypes() { + return mKeyTypes; + } + + @CalledByNative + private int getRequestId() { + return mId; + } + + @CalledByNative + private AndroidPrivateKey createTestPrivateKey() { + return new AndroidPrivateKey() { + @Override + public AndroidKeyStore getKeyStore() { + return null; + } + }; + } + + @CalledByNative + private byte[][] createTestCertChain() { + return new byte[][]{{1}}; + } +} |