From 665d33bb52e224cfb61a2791867fe3caaf6dc4d0 Mon Sep 17 00:00:00 2001 From: Susanne Westphal Date: Fri, 19 May 2023 09:06:59 +0000 Subject: [WebView] Remove setSupportLibraryVersion()-code This code was added for an AndroidX-API that has never been submitted (r.android.com/1138298). Removing this code again as we do not intend to add this any more. Change-Id: I408d4988cc53358a1d79384174b0d99fcbf8635c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4545100 Commit-Queue: Susanne Westphal Reviewed-by: Richard Coles Reviewed-by: Peter Pakkenberg Cr-Commit-Position: refs/heads/main@{#1146426} NOKEYCHECK=True GitOrigin-RevId: e89c34aea7bc9b05e023e4d640175daa5bdbdc9a --- .../support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java | 1 - src/org/chromium/support_lib_boundary/util/Features.java | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java index f7c7ef7..f415011 100644 --- a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java @@ -18,6 +18,5 @@ public interface WebViewProviderFactoryBoundaryInterface { /* SupportLibraryServiceWorkerController */ InvocationHandler getServiceWorkerController(); /* SupportLibraryTracingController */ InvocationHandler getTracingController(); /* SupportLibraryProxyController */ InvocationHandler getProxyController(); - void setSupportLibraryVersion(String version); /* DropDataContentProviderBoundaryInterface*/ InvocationHandler getDropDataProvider(); } diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java index 30a7bfa..73f1802 100644 --- a/src/org/chromium/support_lib_boundary/util/Features.java +++ b/src/org/chromium/support_lib_boundary/util/Features.java @@ -196,9 +196,6 @@ public class Features { // WebViewCompat.removeWebMessageListener public static final String WEB_MESSAGE_LISTENER = "WEB_MESSAGE_LISTENER"; - // WebViewProviderFactoryAdapter.setSupportLibraryVersion - public static final String SET_SUPPORT_LIBRARY_VERSION = "SET_SUPPORT_LIBRARY_VERSION"; - // WebViewCompat.addDocumentStartJavascript public static final String DOCUMENT_START_SCRIPT = "DOCUMENT_START_SCRIPT:1"; -- cgit v1.2.3 From 6e616e1098678d1d249d51090ff25d7185955d1c Mon Sep 17 00:00:00 2001 From: Richard He Date: Wed, 31 May 2023 13:13:32 +0000 Subject: [WebView] Unhide WEB_MESSAGE_ARRAY_BUFFER And deprecate `WEB_MESSAGE_GET_MESSAGE_PAYLOAD` which is renamed. Bug: 1023334 Bug: 1374142 Change-Id: I7bdae3d588cd7e301188ad3829b42b93e6042520 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4568044 Reviewed-by: Peter Pakkenberg Commit-Queue: Richard He Cr-Commit-Position: refs/heads/main@{#1151190} NOKEYCHECK=True GitOrigin-RevId: 918e0720f49be5db1cb5938c0bdd9c51356fc42c --- src/org/chromium/support_lib_boundary/util/Features.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java index 73f1802..840d4f7 100644 --- a/src/org/chromium/support_lib_boundary/util/Features.java +++ b/src/org/chromium/support_lib_boundary/util/Features.java @@ -106,8 +106,9 @@ public class Features { "SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL"; /** - * Feature was renamed to WEB_MESSAGE_ARRAY_BUFFER. + * @deprecated Feature was renamed to WEB_MESSAGE_ARRAY_BUFFER. Do not reuse feature name. */ + @Deprecated() public static final String WEB_MESSAGE_GET_MESSAGE_PAYLOAD = "WEB_MESSAGE_GET_MESSAGE_PAYLOAD"; // JsReplyProxy.postMessageWithPayload -- cgit v1.2.3 From e40649944a9ad13292864e5c378e3df10f35d3ad Mon Sep 17 00:00:00 2001 From: Susanne Westphal Date: Fri, 16 Jun 2023 17:24:07 +0000 Subject: [WebView] Remove content relationship verification code Bug: 1454473 Change-Id: Ib25c2114f9b92e6160db86498f520f9276f46ecd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4608053 Reviewed-by: Bo Liu Commit-Queue: Susanne Westphal Reviewed-by: Colin Blundell Reviewed-by: Richard Coles Reviewed-by: Philip Rogers Cr-Commit-Position: refs/heads/main@{#1158928} NOKEYCHECK=True GitOrigin-RevId: 334d01268df246e959b238956ab956413562edfb --- src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java | 2 -- src/org/chromium/support_lib_boundary/util/Features.java | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java index ef9eef8..af22eb5 100644 --- a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java @@ -62,6 +62,4 @@ public interface WebSettingsBoundaryInterface { void setEnterpriseAuthenticationAppLinkPolicyEnabled(boolean enabled); boolean getEnterpriseAuthenticationAppLinkPolicyEnabled(); - - void enableRestrictSensitiveWebContent(); } diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java index 840d4f7..092947f 100644 --- a/src/org/chromium/support_lib_boundary/util/Features.java +++ b/src/org/chromium/support_lib_boundary/util/Features.java @@ -244,5 +244,6 @@ public class Features { public static final String IMAGE_DRAG_DROP = "IMAGE_DRAG_DROP"; // WebSettingsCompat.enableRestrictSensitiveWebContent + @Deprecated() public static final String RESTRICT_SENSITIVE_WEB_CONTENT = "RESTRICT_SENSITIVE_WEB_CONTENT"; } -- cgit v1.2.3 From 35e9708a24951c2fe15a151235846a3562846c16 Mon Sep 17 00:00:00 2001 From: Victor Tan Date: Mon, 28 Aug 2023 15:41:47 +0000 Subject: [WebView] Implement support library glue for user-agent metadata Add boundary interface and support lib glue for set/get user-agent metadata. Change-Id: Ib9be1db7cc4555efecb933892cf273c4bf4955e6 Bug: b/294183509 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4783052 Reviewed-by: Peter Pakkenberg Commit-Queue: Victor Tan Cr-Commit-Position: refs/heads/main@{#1188979} NOKEYCHECK=True GitOrigin-RevId: def88fdaad0a1dd89b932b366543a72459b285d9 --- .../chromium/support_lib_boundary/WebSettingsBoundaryInterface.java | 4 ++++ src/org/chromium/support_lib_boundary/util/Features.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java index af22eb5..987dd78 100644 --- a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java @@ -11,6 +11,7 @@ package org.chromium.support_lib_boundary; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.util.Map; import java.util.Set; /** @@ -62,4 +63,7 @@ public interface WebSettingsBoundaryInterface { void setEnterpriseAuthenticationAppLinkPolicyEnabled(boolean enabled); boolean getEnterpriseAuthenticationAppLinkPolicyEnabled(); + + void setUserAgentMetadataFromMap(Map uaMetadata); + Map getUserAgentMetadataMap(); } diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java index 092947f..870ac09 100644 --- a/src/org/chromium/support_lib_boundary/util/Features.java +++ b/src/org/chromium/support_lib_boundary/util/Features.java @@ -246,4 +246,8 @@ public class Features { // WebSettingsCompat.enableRestrictSensitiveWebContent @Deprecated() public static final String RESTRICT_SENSITIVE_WEB_CONTENT = "RESTRICT_SENSITIVE_WEB_CONTENT"; + + // WebSettingsCompat.setUserAgentMetadataFromMap + // WebSettingsCompat.getUserAgentMetadataMap + public static final String USER_AGENT_METADATA = "USER_AGENT_METADATA"; } -- cgit v1.2.3 From e311e4ab96f0ffc4543791c3df48b8db124038a6 Mon Sep 17 00:00:00 2001 From: Sayed Date: Fri, 8 Sep 2023 14:44:01 +0000 Subject: [AW][multi-profile] Add BoundaryInterface for Profile and ProfileStore The feature is still in DEV mode hence the suffix in the feature name. Bug: 1467232 Change-Id: I0fbb978bf86aaf74bcd8cf589d5570f77d3e796e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4712113 Auto-Submit: Sayed Elabady Reviewed-by: Peter Pakkenberg Commit-Queue: Sayed Elabady Cr-Commit-Position: refs/heads/main@{#1194097} NOKEYCHECK=True GitOrigin-RevId: 263c7c39d200153f3f76dc5cc97a2550aceb4745 --- BUILD.gn | 2 ++ .../ProfileBoundaryInterface.java | 21 +++++++++++++++++++++ .../ProfileStoreBoundaryInterface.java | 18 ++++++++++++++++++ .../WebViewProviderFactoryBoundaryInterface.java | 1 + .../support_lib_boundary/util/Features.java | 10 ++++++++++ 5 files changed, 52 insertions(+) create mode 100644 src/org/chromium/support_lib_boundary/ProfileBoundaryInterface.java create mode 100644 src/org/chromium/support_lib_boundary/ProfileStoreBoundaryInterface.java diff --git a/BUILD.gn b/BUILD.gn index 43ae324..7d2687a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -12,6 +12,8 @@ android_library("boundary_interface_java") { "src/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface.java", "src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java", "src/org/chromium/support_lib_boundary/ProcessGlobalConfigConstants.java", + "src/org/chromium/support_lib_boundary/ProfileBoundaryInterface.java", + "src/org/chromium/support_lib_boundary/ProfileStoreBoundaryInterface.java", "src/org/chromium/support_lib_boundary/ProxyControllerBoundaryInterface.java", "src/org/chromium/support_lib_boundary/SafeBrowsingResponseBoundaryInterface.java", "src/org/chromium/support_lib_boundary/ScriptHandlerBoundaryInterface.java", diff --git a/src/org/chromium/support_lib_boundary/ProfileBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ProfileBoundaryInterface.java new file mode 100644 index 0000000..b276a31 --- /dev/null +++ b/src/org/chromium/support_lib_boundary/ProfileBoundaryInterface.java @@ -0,0 +1,21 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.support_lib_boundary; + +import android.webkit.CookieManager; +import android.webkit.GeolocationPermissions; +import android.webkit.ServiceWorkerController; +import android.webkit.WebStorage; + +/** + * Boundary interface for Profile. + */ +public interface ProfileBoundaryInterface { + String getName(); + CookieManager getCookieManager(); + WebStorage getWebStorage(); + GeolocationPermissions getGeoLocationPermissions(); + ServiceWorkerController getServiceWorkerController(); +} diff --git a/src/org/chromium/support_lib_boundary/ProfileStoreBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ProfileStoreBoundaryInterface.java new file mode 100644 index 0000000..1db724e --- /dev/null +++ b/src/org/chromium/support_lib_boundary/ProfileStoreBoundaryInterface.java @@ -0,0 +1,18 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.support_lib_boundary; + +import java.lang.reflect.InvocationHandler; +import java.util.List; + +public interface ProfileStoreBoundaryInterface { + /* ProfileBoundaryInterface */ InvocationHandler getOrCreateProfile(String name); + + /* ProfileBoundaryInterface */ InvocationHandler getProfile(String name); + + List getAllProfileNames(); + + boolean deleteProfile(String name); +} diff --git a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java index f415011..9d02930 100644 --- a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java @@ -19,4 +19,5 @@ public interface WebViewProviderFactoryBoundaryInterface { /* SupportLibraryTracingController */ InvocationHandler getTracingController(); /* SupportLibraryProxyController */ InvocationHandler getProxyController(); /* DropDataContentProviderBoundaryInterface*/ InvocationHandler getDropDataProvider(); + /* ProfileStoreBoundaryInterface */ InvocationHandler getProfileStore(); } diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java index 870ac09..d4a5250 100644 --- a/src/org/chromium/support_lib_boundary/util/Features.java +++ b/src/org/chromium/support_lib_boundary/util/Features.java @@ -243,6 +243,16 @@ public class Features { // DropDataContentProvider.call public static final String IMAGE_DRAG_DROP = "IMAGE_DRAG_DROP"; + // ProfileStore.getOrCreateProfileAsync + // ProfileStore.getProfileAsync + // ProfileStore.getAllProfileNamesAsync + // ProfileStore.deleteProfileAsync + // Profile.getCookieManager + // Profile.getWebStorage + // Profile.getGeolocationPermissions + // Profile.getServiceWorkerController + public static final String MULTI_PROFILE = "MULTI_PROFILE"; + // WebSettingsCompat.enableRestrictSensitiveWebContent @Deprecated() public static final String RESTRICT_SENSITIVE_WEB_CONTENT = "RESTRICT_SENSITIVE_WEB_CONTENT"; -- cgit v1.2.3 From 9071f11fb869146a0c417e3bc77574fcc8a076a6 Mon Sep 17 00:00:00 2001 From: Andrew Grieve Date: Wed, 13 Sep 2023 19:47:34 +0000 Subject: Android: Mark kitkat as unsupported in our build system Cronet no longer requires kitkat support, so we should be able to remove kitkat-specific things (e.g. legacy multidex). Bug: 1471145 Change-Id: Ib1caf8a22870db4dd775999fa9bee38f3d9a7da9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4822585 Reviewed-by: Andrew Grieve Commit-Queue: Andrew Grieve Code-Coverage: findit-for-me@appspot.gserviceaccount.com Reviewed-by: Nate Fischer Reviewed-by: Peter Pakkenberg Cr-Commit-Position: refs/heads/main@{#1196200} NOKEYCHECK=True GitOrigin-RevId: 6286cc03985e9b99978f614b85bb8f0cf76526f6 --- BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 7d2687a..a7e8d2a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -62,7 +62,7 @@ android_apk("boundary_interface_example_apk") { # against the minSdkVersion of the webkit support library module. As the # minSdkVersion of the support library increases, so should this value. See # http://crbug.com/828184 for more details. - min_sdk_version = 14 + lint_min_sdk_version = 14 # Explicitly enable lint for this apk. enable_lint = true -- cgit v1.2.3 From dcc4957ca68e31fc47ab4a7104aa3ae17f56dd86 Mon Sep 17 00:00:00 2001 From: Sayed Date: Thu, 21 Sep 2023 09:52:40 +0000 Subject: [AW][multi-profile] Add BoundaryInterface for setProfile and getProfile This CL adds the chromium side work for setProfile and getProfile, there will be another CL for AndroidX side. Bug: 1467232 Change-Id: I1070de4130466b659ea843e1ca91e07f5c2fad3e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4765551 Commit-Queue: Sayed Elabady Reviewed-by: Peter Pakkenberg Reviewed-by: Richard (Torne) Coles Cr-Commit-Position: refs/heads/main@{#1199499} NOKEYCHECK=True GitOrigin-RevId: 54d127d7c9d9e1e6a069bd401fd7f39c14998a24 --- .../chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java index 629f36f..e8b0425 100644 --- a/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java @@ -28,4 +28,6 @@ public interface WebViewProviderBoundaryInterface { /* WebViewRendererClient */ InvocationHandler getWebViewRendererClient(); void setWebViewRendererClient( /* WebViewRendererClient */ InvocationHandler webViewRendererClient); + void setProfile(String profileName); + /* Profile */ InvocationHandler getProfile(); } -- cgit v1.2.3 From 49693aeb33c375412eda739beca2631a2ce27d51 Mon Sep 17 00:00:00 2001 From: Peter Birk Pakkenberg Date: Tue, 26 Sep 2023 15:53:48 +0000 Subject: Add support lib binding for attribution configuration Bug: 1473966 Change-Id: Iaec11296be12c47438123037d7edb9e51c6269a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4894425 Commit-Queue: Peter Pakkenberg Reviewed-by: Richard (Torne) Coles Cr-Commit-Position: refs/heads/main@{#1201615} NOKEYCHECK=True GitOrigin-RevId: d9507a6332ac3629f3c7feba4380bfe75e6af98d --- .../support_lib_boundary/WebSettingsBoundaryInterface.java | 13 +++++++++++++ src/org/chromium/support_lib_boundary/util/Features.java | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java index 987dd78..f41fcb0 100644 --- a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java @@ -66,4 +66,17 @@ public interface WebSettingsBoundaryInterface { void setUserAgentMetadataFromMap(Map uaMetadata); Map getUserAgentMetadataMap(); + + @Retention(RetentionPolicy.SOURCE) + @interface AttributionBehavior { + int DISABLED = 0; + int APP_SOURCE_AND_WEB_TRIGGER = 1; + int WEB_SOURCE_AND_WEB_TRIGGER = 2; + int APP_SOURCE_AND_APP_TRIGGER = 3; + } + + void setAttributionBehavior(@AttributionBehavior int behavior); + + @AttributionBehavior + int getAttributionBehavior(); } diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java index d4a5250..2a2d523 100644 --- a/src/org/chromium/support_lib_boundary/util/Features.java +++ b/src/org/chromium/support_lib_boundary/util/Features.java @@ -260,4 +260,8 @@ public class Features { // WebSettingsCompat.setUserAgentMetadataFromMap // WebSettingsCompat.getUserAgentMetadataMap public static final String USER_AGENT_METADATA = "USER_AGENT_METADATA"; + + // WebSettingsCompat.setAttributionBehavior + // WebSettingsCompat.getAttributionBehavior + public static final String ATTRIBUTION_BEHAVIOR = "ATTRIBUTION_BEHAVIOR"; } -- cgit v1.2.3 From d5bfe6361a31c97f1049683c3407b627dfbfdc90 Mon Sep 17 00:00:00 2001 From: Sayed Date: Fri, 29 Sep 2023 07:55:10 +0000 Subject: [AW][multi-profile] Remove DEV_SUFFIX from MULTI_PROFILE feature Remove the dev suffix to prepare for the AndroidX release. Fixed: 1467232 Change-Id: I359fa4644a11b63be3408e89e15b4ae4529929a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4895669 Reviewed-by: Peter Pakkenberg Auto-Submit: Sayed Elabady Commit-Queue: Peter Pakkenberg Cr-Commit-Position: refs/heads/main@{#1203119} NOKEYCHECK=True GitOrigin-RevId: 7fcb89be1f9276f474617531743ae5f19e6e063d --- src/org/chromium/support_lib_boundary/util/Features.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java index 2a2d523..20200e1 100644 --- a/src/org/chromium/support_lib_boundary/util/Features.java +++ b/src/org/chromium/support_lib_boundary/util/Features.java @@ -243,10 +243,12 @@ public class Features { // DropDataContentProvider.call public static final String IMAGE_DRAG_DROP = "IMAGE_DRAG_DROP"; - // ProfileStore.getOrCreateProfileAsync - // ProfileStore.getProfileAsync - // ProfileStore.getAllProfileNamesAsync - // ProfileStore.deleteProfileAsync + // ProfileStore.getInstance + // ProfileStore.getOrCreateProfile + // ProfileStore.getProfile + // ProfileStore.getAllProfileNames + // ProfileStore.deleteProfile + // Profile.getName // Profile.getCookieManager // Profile.getWebStorage // Profile.getGeolocationPermissions -- cgit v1.2.3 From f047724010e0caccfafebb541e0253d987cb151b Mon Sep 17 00:00:00 2001 From: Aashna Date: Tue, 14 Nov 2023 18:52:53 +0000 Subject: Add support for get/set WebView Media Integrity API config AndroidX API Plumbing for following AndroidX APIs: - getWebViewMediaIntegrityApiStatus - setWebViewMediaIntegrityApiStatus Perform explicit conversion between boundary interface status types and internal config status types in case both accidentally diverge at some point. Design Doc: go/wv-pia-design-androidx Bug: b/301393651 Change-Id: I01bbfde44ea308d13c951750c15363cd99ce5390 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5002172 Reviewed-by: Michael van Ouwerkerk Commit-Queue: Aashna Jena Auto-Submit: Aashna Jena Reviewed-by: Peter Beverloo Reviewed-by: Peter Pakkenberg Cr-Commit-Position: refs/heads/main@{#1224423} NOKEYCHECK=True GitOrigin-RevId: ab8cc3d83dcf4df23f2b81a4d38112ca0dc42ba3 --- .../WebSettingsBoundaryInterface.java | 19 +++++++++++++++++++ .../chromium/support_lib_boundary/util/Features.java | 5 +++++ 2 files changed, 24 insertions(+) diff --git a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java index f41fcb0..8555ea2 100644 --- a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java @@ -9,8 +9,10 @@ package org.chromium.support_lib_boundary; // app-facing classes should have a boundary-interface that the WebView glue layer can build // against. +import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; import java.util.Map; import java.util.Set; @@ -79,4 +81,21 @@ public interface WebSettingsBoundaryInterface { @AttributionBehavior int getAttributionBehavior(); + + @Target(ElementType.TYPE_USE) + @Retention(RetentionPolicy.SOURCE) + @interface WebViewMediaIntegrityApiStatus { + int DISABLED = 0; + int ENABLED_WITHOUT_APP_IDENTITY = 1; + int ENABLED = 2; + } + + void setWebViewMediaIntegrityApiStatus( + @WebViewMediaIntegrityApiStatus int defaultPermission, + Map permissionConfig); + + @WebViewMediaIntegrityApiStatus + int getWebViewMediaIntegrityApiDefaultStatus(); + + Map getWebViewMediaIntegrityApiOverrideRules(); } diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java index 20200e1..d2e99f3 100644 --- a/src/org/chromium/support_lib_boundary/util/Features.java +++ b/src/org/chromium/support_lib_boundary/util/Features.java @@ -266,4 +266,9 @@ public class Features { // WebSettingsCompat.setAttributionBehavior // WebSettingsCompat.getAttributionBehavior public static final String ATTRIBUTION_BEHAVIOR = "ATTRIBUTION_BEHAVIOR"; + + // WebSettingsCompat.setWebViewMediaIntegrityApiStatus + // WebSettingsCompat.getWebViewMediaIntegrityApiDefaultStatus + // WebSettingsCompat.getWebViewMediaIntegrityApiOverrideRules + public static final String WEBVIEW_MEDIA_INTEGRITY_API_STATUS = "WEBVIEW_INTEGRITY_API_STATUS"; } -- cgit v1.2.3 From 20f0b99499b29e6c2260c662b8ff42e2e031558b Mon Sep 17 00:00:00 2001 From: Andrew Grieve Date: Thu, 23 Nov 2023 20:41:00 +0000 Subject: LSC: Reformat //android_webview/**/*.java with google-java-format See: https://docs.google.com/document/d/1XKHDXIlUP4p9tWQQnImCPhoKbXEgX-otdwEjX8G6SpQ/edit Bug: 1491626 Change-Id: Ibd73ebd59d8964fe97b48cd022072eb77c68d036 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5054958 Reviewed-by: Peter Wen Owners-Override: Andrew Grieve Commit-Queue: Andrew Grieve Commit-Queue: Peter Wen Auto-Submit: Andrew Grieve Cr-Commit-Position: refs/heads/main@{#1228561} NOKEYCHECK=True GitOrigin-RevId: feff2176e905c3a859893fd7922f1cca496f1baa --- .../DropDataContentProviderBoundaryInterface.java | 22 ++++++++++++++++------ .../JsReplyProxyBoundaryInterface.java | 8 ++------ .../ProcessGlobalConfigConstants.java | 6 ++---- .../ProfileBoundaryInterface.java | 8 +++++--- .../ProxyControllerBoundaryInterface.java | 14 +++++++++----- .../SafeBrowsingResponseBoundaryInterface.java | 6 +++--- .../ScriptHandlerBoundaryInterface.java | 4 +--- .../ServiceWorkerClientBoundaryInterface.java | 4 +--- .../ServiceWorkerControllerBoundaryInterface.java | 5 ++--- .../ServiceWorkerWebSettingsBoundaryInterface.java | 4 +--- .../StaticsBoundaryInterface.java | 9 ++++++--- .../TracingControllerBoundaryInterface.java | 6 ++---- .../VisualStateCallbackBoundaryInterface.java | 4 +++- .../WebMessageBoundaryInterface.java | 4 +--- .../WebMessageCallbackBoundaryInterface.java | 7 +++---- .../WebMessageListenerBoundaryInterface.java | 12 +++++++----- .../WebMessagePayloadBoundaryInterface.java | 7 +++---- .../WebMessagePortBoundaryInterface.java | 4 +--- .../WebResourceErrorBoundaryInterface.java | 5 ++--- .../WebResourceRequestBoundaryInterface.java | 8 ++++---- .../WebSettingsBoundaryInterface.java | 15 ++++++++++++--- .../WebViewClientBoundaryInterface.java | 22 ++++++++++++++++------ .../WebViewCookieManagerBoundaryInterface.java | 4 +--- .../WebViewProviderBoundaryInterface.java | 20 +++++++++++++++++--- .../WebViewProviderFactoryBoundaryInterface.java | 8 ++++++++ .../WebViewRendererBoundaryInterface.java | 4 +--- .../WebViewRendererClientBoundaryInterface.java | 5 ++--- .../WebkitToCompatConverterBoundaryInterface.java | 5 +++++ .../support_lib_boundary/package-info.java | 4 +--- .../util/BoundaryInterfaceReflectionUtil.java | 16 +++++++--------- .../support_lib_boundary/util/Features.java | 8 ++------ 31 files changed, 146 insertions(+), 112 deletions(-) diff --git a/src/org/chromium/support_lib_boundary/DropDataContentProviderBoundaryInterface.java b/src/org/chromium/support_lib_boundary/DropDataContentProviderBoundaryInterface.java index 9e694a2..8872999 100644 --- a/src/org/chromium/support_lib_boundary/DropDataContentProviderBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/DropDataContentProviderBoundaryInterface.java @@ -15,19 +15,29 @@ import androidx.annotation.Nullable; import java.io.FileNotFoundException; -/** - * Boundary interface for DropDataProvider. - */ +/** Boundary interface for DropDataProvider. */ public interface DropDataContentProviderBoundaryInterface { boolean onCreate(); + String[] getStreamTypes(@NonNull Uri uri, @NonNull String mimeTypeFilter); + ParcelFileDescriptor openFile(@NonNull ContentProvider providerWrapper, @NonNull Uri uri) throws FileNotFoundException; - Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, - @Nullable String[] selectionArgs, @Nullable String sortOrder); + + Cursor query( + @NonNull Uri uri, + @Nullable String[] projection, + @Nullable String selection, + @Nullable String[] selectionArgs, + @Nullable String sortOrder); + String getType(@NonNull Uri uri); + Uri cache(byte[] imageBytes, String encodingFormat, String filename); + void setClearCachedDataIntervalMs(int milliseconds); + void onDragEnd(boolean imageInUse); + Bundle call(@NonNull String method, @Nullable String arg, @Nullable Bundle extras); -} \ No newline at end of file +} diff --git a/src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java b/src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java index 689982f..7e70f21 100644 --- a/src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java @@ -6,13 +6,9 @@ package org.chromium.support_lib_boundary; import java.lang.reflect.InvocationHandler; -/** - * Boundary interface for org.chromium.android_webview.WebMessageListener. - */ +/** Boundary interface for org.chromium.android_webview.WebMessageListener. */ public interface JsReplyProxyBoundaryInterface extends IsomorphicObjectBoundaryInterface { - /** - * Prefer using {@link #postMessageWithPayload}. - */ + /** Prefer using {@link #postMessageWithPayload}. */ void postMessage(String message); void postMessageWithPayload(/* MessagePayload */ InvocationHandler payload); diff --git a/src/org/chromium/support_lib_boundary/ProcessGlobalConfigConstants.java b/src/org/chromium/support_lib_boundary/ProcessGlobalConfigConstants.java index 1b8a7d2..1f40347 100644 --- a/src/org/chromium/support_lib_boundary/ProcessGlobalConfigConstants.java +++ b/src/org/chromium/support_lib_boundary/ProcessGlobalConfigConstants.java @@ -12,9 +12,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -/** - * Constants for ProcessGlobalConfig shared between chromium and AndroidX. - */ +/** Constants for ProcessGlobalConfig shared between chromium and AndroidX. */ public final class ProcessGlobalConfigConstants { private ProcessGlobalConfigConstants() {} @@ -42,4 +40,4 @@ public final class ProcessGlobalConfigConstants { * chromium via reflection into AndroidX class. */ public static final String CACHE_DIRECTORY_BASE_PATH = "CACHE_DIRECTORY_BASE_PATH"; -} \ No newline at end of file +} diff --git a/src/org/chromium/support_lib_boundary/ProfileBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ProfileBoundaryInterface.java index b276a31..457a561 100644 --- a/src/org/chromium/support_lib_boundary/ProfileBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/ProfileBoundaryInterface.java @@ -9,13 +9,15 @@ import android.webkit.GeolocationPermissions; import android.webkit.ServiceWorkerController; import android.webkit.WebStorage; -/** - * Boundary interface for Profile. - */ +/** Boundary interface for Profile. */ public interface ProfileBoundaryInterface { String getName(); + CookieManager getCookieManager(); + WebStorage getWebStorage(); + GeolocationPermissions getGeoLocationPermissions(); + ServiceWorkerController getServiceWorkerController(); } diff --git a/src/org/chromium/support_lib_boundary/ProxyControllerBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ProxyControllerBoundaryInterface.java index ff9ed8c..77e1644 100644 --- a/src/org/chromium/support_lib_boundary/ProxyControllerBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/ProxyControllerBoundaryInterface.java @@ -6,13 +6,17 @@ package org.chromium.support_lib_boundary; import java.util.concurrent.Executor; -/** - * Boundary interface for ProxyController. - */ +/** Boundary interface for ProxyController. */ public interface ProxyControllerBoundaryInterface { void setProxyOverride( String[][] proxyRules, String[] bypassRules, Runnable listener, Executor executor); - void setProxyOverride(String[][] proxyRules, String[] bypassRules, Runnable listener, - Executor executor, boolean reverseBypass); + + void setProxyOverride( + String[][] proxyRules, + String[] bypassRules, + Runnable listener, + Executor executor, + boolean reverseBypass); + void clearProxyOverride(Runnable listener, Executor executor); } diff --git a/src/org/chromium/support_lib_boundary/SafeBrowsingResponseBoundaryInterface.java b/src/org/chromium/support_lib_boundary/SafeBrowsingResponseBoundaryInterface.java index 0b88b28..4419770 100644 --- a/src/org/chromium/support_lib_boundary/SafeBrowsingResponseBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/SafeBrowsingResponseBoundaryInterface.java @@ -4,11 +4,11 @@ package org.chromium.support_lib_boundary; -/** - * Boundary interface for SafeBrowsingResponseCompat. - */ +/** Boundary interface for SafeBrowsingResponseCompat. */ public interface SafeBrowsingResponseBoundaryInterface { void showInterstitial(boolean allowReporting); + void proceed(boolean report); + void backToSafety(boolean report); } diff --git a/src/org/chromium/support_lib_boundary/ScriptHandlerBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ScriptHandlerBoundaryInterface.java index 7d2c8f2..c8134bb 100644 --- a/src/org/chromium/support_lib_boundary/ScriptHandlerBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/ScriptHandlerBoundaryInterface.java @@ -4,9 +4,7 @@ package org.chromium.support_lib_boundary; -/** - * Boundary interface for AwContents.addDocumentStartJavascript(). - */ +/** Boundary interface for AwContents.addDocumentStartJavascript(). */ public interface ScriptHandlerBoundaryInterface { void remove(); } diff --git a/src/org/chromium/support_lib_boundary/ServiceWorkerClientBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ServiceWorkerClientBoundaryInterface.java index 43d09d7..713ba5c 100644 --- a/src/org/chromium/support_lib_boundary/ServiceWorkerClientBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/ServiceWorkerClientBoundaryInterface.java @@ -7,9 +7,7 @@ package org.chromium.support_lib_boundary; import android.webkit.WebResourceRequest; import android.webkit.WebResourceResponse; -/** - * Boundary interface for ServiceWorkerClient. - */ +/** Boundary interface for ServiceWorkerClient. */ public interface ServiceWorkerClientBoundaryInterface extends FeatureFlagHolderBoundaryInterface { WebResourceResponse shouldInterceptRequest(WebResourceRequest request); } diff --git a/src/org/chromium/support_lib_boundary/ServiceWorkerControllerBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ServiceWorkerControllerBoundaryInterface.java index 077a8fd..9acb9a8 100644 --- a/src/org/chromium/support_lib_boundary/ServiceWorkerControllerBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/ServiceWorkerControllerBoundaryInterface.java @@ -6,10 +6,9 @@ package org.chromium.support_lib_boundary; import java.lang.reflect.InvocationHandler; -/** - * Boundary interface for ServiceWorkerController. - */ +/** Boundary interface for ServiceWorkerController. */ public interface ServiceWorkerControllerBoundaryInterface { /* ServiceWorkerWebSettings */ InvocationHandler getServiceWorkerWebSettings(); + void setServiceWorkerClient(/* ServiceWorkerClient */ InvocationHandler client); } diff --git a/src/org/chromium/support_lib_boundary/ServiceWorkerWebSettingsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ServiceWorkerWebSettingsBoundaryInterface.java index f13f3a1..b308814 100644 --- a/src/org/chromium/support_lib_boundary/ServiceWorkerWebSettingsBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/ServiceWorkerWebSettingsBoundaryInterface.java @@ -6,9 +6,7 @@ package org.chromium.support_lib_boundary; import java.util.Set; -/** - * Boundary interface for ServiceWorkerWebSettings. - */ +/** Boundary interface for ServiceWorkerWebSettings. */ public interface ServiceWorkerWebSettingsBoundaryInterface { void setCacheMode(int mode); diff --git a/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java index 8b281fc..d39558f 100644 --- a/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java @@ -11,14 +11,17 @@ import android.webkit.ValueCallback; import java.util.List; import java.util.Set; -/** - * Boundary interface for WebViewFactoryProvider.Statics. - */ +/** Boundary interface for WebViewFactoryProvider.Statics. */ public interface StaticsBoundaryInterface { void initSafeBrowsing(Context context, ValueCallback callback); + void setSafeBrowsingAllowlist(Set hosts, ValueCallback callback); + void setSafeBrowsingWhitelist(List hosts, ValueCallback callback); + Uri getSafeBrowsingPrivacyPolicyUrl(); + boolean isMultiProcessEnabled(); + String getVariationsHeader(); } diff --git a/src/org/chromium/support_lib_boundary/TracingControllerBoundaryInterface.java b/src/org/chromium/support_lib_boundary/TracingControllerBoundaryInterface.java index 4f21973..c8606db 100644 --- a/src/org/chromium/support_lib_boundary/TracingControllerBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/TracingControllerBoundaryInterface.java @@ -8,9 +8,7 @@ import java.io.OutputStream; import java.util.Collection; import java.util.concurrent.Executor; -/** - * Boundary interface for TracingController. - */ +/** Boundary interface for TracingController. */ public interface TracingControllerBoundaryInterface { boolean isTracing(); @@ -18,4 +16,4 @@ public interface TracingControllerBoundaryInterface { throws IllegalStateException, IllegalArgumentException; boolean stop(OutputStream outputStream, Executor executor); -} \ No newline at end of file +} diff --git a/src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java b/src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java index add67f7..f40b601 100644 --- a/src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java @@ -6,4 +6,6 @@ package org.chromium.support_lib_boundary; /** */ -public interface VisualStateCallbackBoundaryInterface { void onComplete(long requestId); } +public interface VisualStateCallbackBoundaryInterface { + void onComplete(long requestId); +} diff --git a/src/org/chromium/support_lib_boundary/WebMessageBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebMessageBoundaryInterface.java index d4315d2..15a2e06 100644 --- a/src/org/chromium/support_lib_boundary/WebMessageBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebMessageBoundaryInterface.java @@ -6,9 +6,7 @@ package org.chromium.support_lib_boundary; import java.lang.reflect.InvocationHandler; -/** - * Boundary interface for WebMessage. - */ +/** Boundary interface for WebMessage. */ public interface WebMessageBoundaryInterface extends FeatureFlagHolderBoundaryInterface { @Deprecated String getData(); diff --git a/src/org/chromium/support_lib_boundary/WebMessageCallbackBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebMessageCallbackBoundaryInterface.java index 18710ce..19cbcdd 100644 --- a/src/org/chromium/support_lib_boundary/WebMessageCallbackBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebMessageCallbackBoundaryInterface.java @@ -6,10 +6,9 @@ package org.chromium.support_lib_boundary; import java.lang.reflect.InvocationHandler; -/** - * Boundary interface for WebMessagePort.WebMessageCallback. - */ +/** Boundary interface for WebMessagePort.WebMessageCallback. */ public interface WebMessageCallbackBoundaryInterface extends FeatureFlagHolderBoundaryInterface { - void onMessage(/* WebMessagePort */ InvocationHandler port, + void onMessage( + /* WebMessagePort */ InvocationHandler port, /* WebMessage */ InvocationHandler message); } diff --git a/src/org/chromium/support_lib_boundary/WebMessageListenerBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebMessageListenerBoundaryInterface.java index 6019027..4527a09 100644 --- a/src/org/chromium/support_lib_boundary/WebMessageListenerBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebMessageListenerBoundaryInterface.java @@ -9,10 +9,12 @@ import android.webkit.WebView; import java.lang.reflect.InvocationHandler; -/** - * Boundary interface for org.chromium.android_webview.WebMessageListener. - */ +/** Boundary interface for org.chromium.android_webview.WebMessageListener. */ public interface WebMessageListenerBoundaryInterface extends FeatureFlagHolderBoundaryInterface { - void onPostMessage(WebView view, /* WebMessage */ InvocationHandler message, Uri sourceOrigin, - boolean isMainFrame, /* JsReplyProxy */ InvocationHandler replyProxy); + void onPostMessage( + WebView view, + /* WebMessage */ InvocationHandler message, + Uri sourceOrigin, + boolean isMainFrame, + /* JsReplyProxy */ InvocationHandler replyProxy); } diff --git a/src/org/chromium/support_lib_boundary/WebMessagePayloadBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebMessagePayloadBoundaryInterface.java index 4635438..1b3061f 100644 --- a/src/org/chromium/support_lib_boundary/WebMessagePayloadBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebMessagePayloadBoundaryInterface.java @@ -11,9 +11,7 @@ import androidx.annotation.Nullable; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -/** - * Boundary interface for WebMessagePayload. - */ +/** Boundary interface for WebMessagePayload. */ public interface WebMessagePayloadBoundaryInterface extends FeatureFlagHolderBoundaryInterface { @WebMessagePayloadType int getType(); @@ -25,7 +23,8 @@ public interface WebMessagePayloadBoundaryInterface extends FeatureFlagHolderBou byte[] getAsArrayBuffer(); @Retention(RetentionPolicy.SOURCE) - @IntDef(flag = true, + @IntDef( + flag = true, value = {WebMessagePayloadType.TYPE_STRING, WebMessagePayloadType.TYPE_ARRAY_BUFFER}) @interface WebMessagePayloadType { int TYPE_STRING = 0; diff --git a/src/org/chromium/support_lib_boundary/WebMessagePortBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebMessagePortBoundaryInterface.java index e78adcf..95ba756 100644 --- a/src/org/chromium/support_lib_boundary/WebMessagePortBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebMessagePortBoundaryInterface.java @@ -8,9 +8,7 @@ import android.os.Handler; import java.lang.reflect.InvocationHandler; -/** - * Boundary interface for WebMessagePort. - */ +/** Boundary interface for WebMessagePort. */ public interface WebMessagePortBoundaryInterface { void postMessage(/* WebMessage */ InvocationHandler message); diff --git a/src/org/chromium/support_lib_boundary/WebResourceErrorBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebResourceErrorBoundaryInterface.java index 3830415..93c9399 100644 --- a/src/org/chromium/support_lib_boundary/WebResourceErrorBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebResourceErrorBoundaryInterface.java @@ -4,10 +4,9 @@ package org.chromium.support_lib_boundary; -/** - * Boundary interface for WebResourceErrorCompat. - */ +/** Boundary interface for WebResourceErrorCompat. */ public interface WebResourceErrorBoundaryInterface { int getErrorCode(); + CharSequence getDescription(); } diff --git a/src/org/chromium/support_lib_boundary/WebResourceRequestBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebResourceRequestBoundaryInterface.java index 30be829..43629ce 100644 --- a/src/org/chromium/support_lib_boundary/WebResourceRequestBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebResourceRequestBoundaryInterface.java @@ -4,7 +4,7 @@ package org.chromium.support_lib_boundary; -/** - * Boundary interface for WebResourceRequest. - */ -public interface WebResourceRequestBoundaryInterface { boolean isRedirect(); } +/** Boundary interface for WebResourceRequest. */ +public interface WebResourceRequestBoundaryInterface { + boolean isRedirect(); +} diff --git a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java index 8555ea2..4c85262 100644 --- a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java @@ -16,26 +16,30 @@ import java.lang.annotation.Target; import java.util.Map; import java.util.Set; -/** - * Boundary interface for WebSettingsCompat. - */ +/** Boundary interface for WebSettingsCompat. */ public interface WebSettingsBoundaryInterface { void setOffscreenPreRaster(boolean enabled); + boolean getOffscreenPreRaster(); void setSafeBrowsingEnabled(boolean enabled); + boolean getSafeBrowsingEnabled(); void setDisabledActionModeMenuItems(int menuItems); + int getDisabledActionModeMenuItems(); void setWillSuppressErrorPage(boolean suppressed); + boolean getWillSuppressErrorPage(); void setForceDark(int forceDarkMode); + int getForceDark(); void setAlgorithmicDarkeningAllowed(boolean allow); + boolean isAlgorithmicDarkeningAllowed(); @Retention(RetentionPolicy.SOURCE) @@ -46,6 +50,7 @@ public interface WebSettingsBoundaryInterface { } void setForceDarkBehavior(@ForceDarkBehavior int forceDarkBehavior); + @ForceDarkBehavior int getForceDarkBehavior(); @@ -57,16 +62,20 @@ public interface WebSettingsBoundaryInterface { } void setWebAuthnSupport(@WebAuthnSupport int support); + @WebAuthnSupport int getWebAuthnSupport(); void setRequestedWithHeaderOriginAllowList(Set allowedOriginRules); + Set getRequestedWithHeaderOriginAllowList(); void setEnterpriseAuthenticationAppLinkPolicyEnabled(boolean enabled); + boolean getEnterpriseAuthenticationAppLinkPolicyEnabled(); void setUserAgentMetadataFromMap(Map uaMetadata); + Map getUserAgentMetadataMap(); @Retention(RetentionPolicy.SOURCE) diff --git a/src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java index faaf51f..17cdee1 100644 --- a/src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java @@ -11,18 +11,28 @@ import android.webkit.WebView; import java.lang.reflect.InvocationHandler; -/** - * Boundary interface for WebViewClientCompat. - */ +/** Boundary interface for WebViewClientCompat. */ public interface WebViewClientBoundaryInterface extends FeatureFlagHolderBoundaryInterface { void onPageCommitVisible(WebView view, String url); - void onReceivedError(WebView view, WebResourceRequest request, + + void onReceivedError( + WebView view, + WebResourceRequest request, /* WebResourceError */ InvocationHandler error); + void onReceivedHttpError( WebView view, WebResourceRequest request, WebResourceResponse errorResponse); - void onSafeBrowsingHit(WebView view, WebResourceRequest request, int threatType, + + void onSafeBrowsingHit( + WebView view, + WebResourceRequest request, + int threatType, /* SafeBrowsingResponse */ InvocationHandler callback); + boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request); - boolean onWebAuthnIntent(WebView view, PendingIntent intent, + + boolean onWebAuthnIntent( + WebView view, + PendingIntent intent, /* WebAuthnCallbackBoundaryInterface */ InvocationHandler callback); } diff --git a/src/org/chromium/support_lib_boundary/WebViewCookieManagerBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewCookieManagerBoundaryInterface.java index f79cd22..64bd71f 100644 --- a/src/org/chromium/support_lib_boundary/WebViewCookieManagerBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebViewCookieManagerBoundaryInterface.java @@ -6,9 +6,7 @@ package org.chromium.support_lib_boundary; import java.util.List; -/** - * Boundary interface for CookieManagerCompat. - */ +/** Boundary interface for CookieManagerCompat. */ public interface WebViewCookieManagerBoundaryInterface { List getCookieInfo(String url); } diff --git a/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java index e8b0425..1fd445a 100644 --- a/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java @@ -13,21 +13,35 @@ import java.lang.reflect.InvocationHandler; /** */ public interface WebViewProviderBoundaryInterface { - void insertVisualStateCallback(long requestId, - /* VisualStateCallback */ InvocationHandler callback); + void insertVisualStateCallback( + long requestId, /* VisualStateCallback */ InvocationHandler callback); + /* WebMessagePort */ InvocationHandler[] createWebMessageChannel(); + void postMessageToMainFrame(/* WebMessage */ InvocationHandler message, Uri targetOrigin); - void addWebMessageListener(String jsObjectName, String[] allowedOriginRules, + + void addWebMessageListener( + String jsObjectName, + String[] allowedOriginRules, /* WebMessageListener */ InvocationHandler listener); + void removeWebMessageListener(String jsObjectName); + /* ScriptHandler */ InvocationHandler addDocumentStartJavaScript( String script, String[] allowedOriginRules); + WebViewClient getWebViewClient(); + WebChromeClient getWebChromeClient(); + /* WebViewRenderer */ InvocationHandler getWebViewRenderer(); + /* WebViewRendererClient */ InvocationHandler getWebViewRendererClient(); + void setWebViewRendererClient( /* WebViewRendererClient */ InvocationHandler webViewRendererClient); + void setProfile(String profileName); + /* Profile */ InvocationHandler getProfile(); } diff --git a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java index 9d02930..521c7bb 100644 --- a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java @@ -12,12 +12,20 @@ import java.lang.reflect.InvocationHandler; */ public interface WebViewProviderFactoryBoundaryInterface { /* SupportLibraryWebViewChromium */ InvocationHandler createWebView(WebView webview); + /* SupportLibWebkitToCompatConverter */ InvocationHandler getWebkitToCompatConverter(); + /* StaticsAdapter */ InvocationHandler getStatics(); + String[] getSupportedFeatures(); + /* SupportLibraryServiceWorkerController */ InvocationHandler getServiceWorkerController(); + /* SupportLibraryTracingController */ InvocationHandler getTracingController(); + /* SupportLibraryProxyController */ InvocationHandler getProxyController(); + /* DropDataContentProviderBoundaryInterface*/ InvocationHandler getDropDataProvider(); + /* ProfileStoreBoundaryInterface */ InvocationHandler getProfileStore(); } diff --git a/src/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface.java index db5819b..5f52afd 100644 --- a/src/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface.java @@ -4,9 +4,7 @@ package org.chromium.support_lib_boundary; -/** - * Boundary interface for WebViewRenderer. - */ +/** Boundary interface for WebViewRenderer. */ public interface WebViewRendererBoundaryInterface extends IsomorphicObjectBoundaryInterface { boolean terminate(); } diff --git a/src/org/chromium/support_lib_boundary/WebViewRendererClientBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewRendererClientBoundaryInterface.java index d7b447d..6e3f4f2 100644 --- a/src/org/chromium/support_lib_boundary/WebViewRendererClientBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebViewRendererClientBoundaryInterface.java @@ -8,10 +8,9 @@ import android.webkit.WebView; import java.lang.reflect.InvocationHandler; -/** - * Boundary interface for WebViewRendererClient. - */ +/** Boundary interface for WebViewRendererClient. */ public interface WebViewRendererClientBoundaryInterface extends FeatureFlagHolderBoundaryInterface { void onRendererUnresponsive(WebView view, /* WebViewRenderer */ InvocationHandler renderer); + void onRendererResponsive(WebView view, /* WebViewRenderer */ InvocationHandler renderer); } diff --git a/src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java index 5d4c8ac..c5ab5fe 100644 --- a/src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java @@ -21,6 +21,7 @@ public interface WebkitToCompatConverterBoundaryInterface { // ==================================================== /* SupportLibraryWebSettings */ InvocationHandler convertSettings(WebSettings webSettings); + /* SupportLibraryWebResourceRequest */ InvocationHandler convertWebResourceRequest( WebResourceRequest request); @@ -43,24 +44,28 @@ public interface WebkitToCompatConverterBoundaryInterface { // ServiceWorkerWebSettings /* SupportLibServiceWorkerSettings */ InvocationHandler convertServiceWorkerSettings( /* ServiceWorkerWebSettings */ Object serviceWorkerWebSettings); + /* ServiceWorkerWebSettings */ Object convertServiceWorkerSettings( /* SupportLibServiceWorkerSettings */ InvocationHandler serviceWorkerSettings); // WebResourceError /* SupportLibWebResourceError */ InvocationHandler convertWebResourceError( /* WebResourceError */ Object webResourceError); + /* WebResourceError */ Object convertWebResourceError( /* SupportLibWebResourceError */ InvocationHandler webResourceError); // SafeBrowsingResponse /* SupportLibSafeBrowsingResponse */ InvocationHandler convertSafeBrowsingResponse( /* SafeBrowsingResponse */ Object safeBrowsingResponse); + /* SafeBrowsingResponse */ Object convertSafeBrowsingResponse( /* SupportLibSafeBrowsingResponse */ InvocationHandler safeBrowsingResponse); // WebMessagePort /* SupportLibWebMessagePort */ InvocationHandler convertWebMessagePort( /* WebMessagePort */ Object webMessagePort); + /* WebMessagePort */ Object convertWebMessagePort( /* SupportLibWebMessagePort */ InvocationHandler webMessagePort); diff --git a/src/org/chromium/support_lib_boundary/package-info.java b/src/org/chromium/support_lib_boundary/package-info.java index 1baeb36..47ab7de 100644 --- a/src/org/chromium/support_lib_boundary/package-info.java +++ b/src/org/chromium/support_lib_boundary/package-info.java @@ -2,7 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -/** - * @hide - */ +/** @hide */ package org.chromium.support_lib_boundary; diff --git a/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java b/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java index 1432065..a19dcd0 100644 --- a/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java +++ b/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java @@ -16,9 +16,7 @@ import java.lang.reflect.Proxy; import java.util.Arrays; import java.util.Collection; -/** - * A set of utility methods used for calling across the support library boundary. - */ +/** A set of utility methods used for calling across the support library boundary. */ // Although this is not enforced in chromium, this is a requirement enforced when this file is // mirrored into AndroidX. See http://b/120770118 for details. public class BoundaryInterfaceReflectionUtil { @@ -74,8 +72,10 @@ public class BoundaryInterfaceReflectionUtil { @NonNull Class clazz, @Nullable InvocationHandler invocationHandler) { if (invocationHandler == null) return null; return clazz.cast( - Proxy.newProxyInstance(BoundaryInterfaceReflectionUtil.class.getClassLoader(), - new Class[] {clazz}, invocationHandler)); + Proxy.newProxyInstance( + BoundaryInterfaceReflectionUtil.class.getClassLoader(), + new Class[] {clazz}, + invocationHandler)); } /** @@ -104,7 +104,7 @@ public class BoundaryInterfaceReflectionUtil { *

A {@code null} array of delegates is represented with a {@code null} array of {@link * InvocationHandler}s. Any individual {@code null} delegate is represented with a {@code null} * {@link InvocationHandler}. - + * * @param delegates an array of objects to which to delegate. * @return an array of InvocationHandlerWithDelegateGetter instances, each delegating to * the corresponding member of {@code delegates}. @@ -168,9 +168,7 @@ public class BoundaryInterfaceReflectionUtil { } } - /** - * Gets the delegate object (which is never {@code null}). - */ + /** Gets the delegate object (which is never {@code null}). */ @NonNull public Object getDelegate() { return mDelegate; diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java index d2e99f3..70d2b4e 100644 --- a/src/org/chromium/support_lib_boundary/util/Features.java +++ b/src/org/chromium/support_lib_boundary/util/Features.java @@ -105,9 +105,7 @@ public class Features { public static final String SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL = "SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL"; - /** - * @deprecated Feature was renamed to WEB_MESSAGE_ARRAY_BUFFER. Do not reuse feature name. - */ + /** @deprecated Feature was renamed to WEB_MESSAGE_ARRAY_BUFFER. Do not reuse feature name. */ @Deprecated() public static final String WEB_MESSAGE_GET_MESSAGE_PAYLOAD = "WEB_MESSAGE_GET_MESSAGE_PAYLOAD"; @@ -208,9 +206,7 @@ public class Features { // WebSettingsCompat.getRequestedWithHeaderMode // ServiceWorkerWebSettingsCompat.setRequestedWithHeaderMode // ServiceWorkerWebSettingsCompat.getRequestedWithHeaderMode - /** - * @deprecated Feature was never launched. Do not reuse feature name. - */ + /** @deprecated Feature was never launched. Do not reuse feature name. */ @Deprecated() public static final String REQUESTED_WITH_HEADER_CONTROL = "REQUESTED_WITH_HEADER_CONTROL"; -- cgit v1.2.3 From 21becc1e2f5446a7bbd3d12923647cdbcc537020 Mon Sep 17 00:00:00 2001 From: Aashna Date: Tue, 13 Feb 2024 20:22:32 +0000 Subject: Implement setAudioMuted and isAudioMuted AndroidX APIs Allow developer to get/set whether web contents should be muted. This is the chromium implementation for corresponding AndroidX APIs. Bug: 325071689 Change-Id: I259eba394e7c68233823c415f681c7c9ced0233b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5291076 Commit-Queue: Aashna Jena Reviewed-by: Peter Beverloo Reviewed-by: Richard (Torne) Coles Reviewed-by: Yaron Friedman Cr-Commit-Position: refs/heads/main@{#1260014} NOKEYCHECK=True GitOrigin-RevId: 6509247528531add165b7220518a500a7cfdaa55 --- .../support_lib_boundary/WebViewProviderBoundaryInterface.java | 4 ++++ src/org/chromium/support_lib_boundary/util/Features.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java index 1fd445a..717b3d3 100644 --- a/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java @@ -43,5 +43,9 @@ public interface WebViewProviderBoundaryInterface { void setProfile(String profileName); + void setAudioMuted(boolean muted); + + boolean isAudioMuted(); + /* Profile */ InvocationHandler getProfile(); } diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java index 70d2b4e..95b6ff5 100644 --- a/src/org/chromium/support_lib_boundary/util/Features.java +++ b/src/org/chromium/support_lib_boundary/util/Features.java @@ -267,4 +267,8 @@ public class Features { // WebSettingsCompat.getWebViewMediaIntegrityApiDefaultStatus // WebSettingsCompat.getWebViewMediaIntegrityApiOverrideRules public static final String WEBVIEW_MEDIA_INTEGRITY_API_STATUS = "WEBVIEW_INTEGRITY_API_STATUS"; + + // WebViewCompat.setAudioMuted + // WebViewCompat.isAudioMuted + public static final String MUTE_AUDIO = "MUTE_AUDIO"; } -- cgit v1.2.3 From b574e1a1ae360350bde138b282e828d404e21ea5 Mon Sep 17 00:00:00 2001 From: Adem Derinel Date: Tue, 27 Feb 2024 13:33:08 +0000 Subject: [WebView][WebAuthn] Introduce WebSettings.setWebAuthnSupport The support is per WebView. Hence, we cache the support per WebContents. When the WebContents of a WebView change, we update the cache. Test method: 1 - androidx does not have the API yet. Thus, I modified the WebSettingsCompat.setAlgorithmicDarkeningAllowed to call the new setWebAuthnSupport API. Then I used the API in the test app. 2 - Used the custom GMSCore which includes the ResultReceiver changes. Demo: https://photos.app.goo.gl/bsrJtCuAMM2Ee9Je8 In the demo you see two WebViews within a single app. The first has WebAuthn disabled; the second is in app mode. Bug: b/41483780, b/316886235 Change-Id: If3eae1634044cc117dac435d8bd823194cb47e5a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5273159 Reviewed-by: Richard (Torne) Coles Reviewed-by: Michael van Ouwerkerk Commit-Queue: Adem Derinel Cr-Commit-Position: refs/heads/main@{#1265745} NOKEYCHECK=True GitOrigin-RevId: 991e4f9f43589d8451c10475ba39f4054076d560 --- .../support_lib_boundary/WebSettingsBoundaryInterface.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java index 4c85262..f3a27ce 100644 --- a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java @@ -55,16 +55,16 @@ public interface WebSettingsBoundaryInterface { int getForceDarkBehavior(); @Retention(RetentionPolicy.SOURCE) - @interface WebAuthnSupport { + @interface WebauthnSupport { int NONE = 0; int APP = 1; int BROWSER = 2; } - void setWebAuthnSupport(@WebAuthnSupport int support); + void setWebauthnSupport(@WebauthnSupport int support); - @WebAuthnSupport - int getWebAuthnSupport(); + @WebauthnSupport + int getWebauthnSupport(); void setRequestedWithHeaderOriginAllowList(Set allowedOriginRules); -- cgit v1.2.3 From 162718bca7c7f47ca30b0684bbd0a6ffb3c6fdd4 Mon Sep 17 00:00:00 2001 From: Alexander Timin Date: Tue, 27 Feb 2024 15:33:37 +0000 Subject: Revert "[WebView][WebAuthn] Introduce WebSettings.setWebAuthnSupport" This reverts commit 991e4f9f43589d8451c10475ba39f4054076d560. Reason for revert: Compile failures on Chrome builds: b/327157513 Original change's description: > [WebView][WebAuthn] Introduce WebSettings.setWebAuthnSupport > > The support is per WebView. Hence, we cache the support per WebContents. > When the WebContents of a WebView change, we update the cache. > > Test method: > 1 - androidx does not have the API yet. Thus, I modified the > WebSettingsCompat.setAlgorithmicDarkeningAllowed to call the new > setWebAuthnSupport API. Then I used the API in the test app. > 2 - Used the custom GMSCore which includes the ResultReceiver changes. > > Demo: https://photos.app.goo.gl/bsrJtCuAMM2Ee9Je8 > In the demo you see two WebViews within a single app. The first has > WebAuthn disabled; the second is in app mode. > > Bug: b/41483780, b/316886235 > Change-Id: If3eae1634044cc117dac435d8bd823194cb47e5a > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5273159 > Reviewed-by: Richard (Torne) Coles > Reviewed-by: Michael van Ouwerkerk > Commit-Queue: Adem Derinel > Cr-Commit-Position: refs/heads/main@{#1265745} Bug: b/41483780, b/316886235 Change-Id: If6aef3c7e5dac2be938f4a0384e4dc8746abdb74 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5327387 Reviewed-by: Michael van Ouwerkerk Reviewed-by: Adem Derinel Commit-Queue: Alexander Timin Auto-Submit: Alexander Timin Owners-Override: Alexander Timin Bot-Commit: Rubber Stamper Cr-Commit-Position: refs/heads/main@{#1265805} NOKEYCHECK=True GitOrigin-RevId: 6fcacd41f9ec85ec6c74760646d41e51c4ccafd5 --- .../support_lib_boundary/WebSettingsBoundaryInterface.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java index f3a27ce..4c85262 100644 --- a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java @@ -55,16 +55,16 @@ public interface WebSettingsBoundaryInterface { int getForceDarkBehavior(); @Retention(RetentionPolicy.SOURCE) - @interface WebauthnSupport { + @interface WebAuthnSupport { int NONE = 0; int APP = 1; int BROWSER = 2; } - void setWebauthnSupport(@WebauthnSupport int support); + void setWebAuthnSupport(@WebAuthnSupport int support); - @WebauthnSupport - int getWebauthnSupport(); + @WebAuthnSupport + int getWebAuthnSupport(); void setRequestedWithHeaderOriginAllowList(Set allowedOriginRules); -- cgit v1.2.3 From 574631531468a43b65202a7a276b81fca41c650e Mon Sep 17 00:00:00 2001 From: Adem Derinel Date: Thu, 7 Mar 2024 11:29:44 +0000 Subject: Reland "[WebView][WebAuthn] Introduce WebSettings.setWebAuthnSupport" With the reland of crrev.com/c/5327926, this should be reland to safe. No changes wrt the original CL. This is a reland of commit 991e4f9f43589d8451c10475ba39f4054076d560 Original change's description: > [WebView][WebAuthn] Introduce WebSettings.setWebAuthnSupport > > The support is per WebView. Hence, we cache the support per WebContents. > When the WebContents of a WebView change, we update the cache. > > Test method: > 1 - androidx does not have the API yet. Thus, I modified the > WebSettingsCompat.setAlgorithmicDarkeningAllowed to call the new > setWebAuthnSupport API. Then I used the API in the test app. > 2 - Used the custom GMSCore which includes the ResultReceiver changes. > > Demo: https://photos.app.goo.gl/bsrJtCuAMM2Ee9Je8 > In the demo you see two WebViews within a single app. The first has > WebAuthn disabled; the second is in app mode. > > Bug: b/41483780, b/316886235 > Change-Id: If3eae1634044cc117dac435d8bd823194cb47e5a > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5273159 > Reviewed-by: Richard (Torne) Coles > Reviewed-by: Michael van Ouwerkerk > Commit-Queue: Adem Derinel > Cr-Commit-Position: refs/heads/main@{#1265745} Bug: b/41483780, b/316886235 Change-Id: I95de7a1e05e38f15021b73d062abb8504f60fc66 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5349152 Reviewed-by: Richard (Torne) Coles Reviewed-by: Michael van Ouwerkerk Commit-Queue: Adem Derinel Cr-Commit-Position: refs/heads/main@{#1269507} NOKEYCHECK=True GitOrigin-RevId: 916b2555fb5e060d9e53f472c655ea748b713b9d --- .../support_lib_boundary/WebSettingsBoundaryInterface.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java index 4c85262..f3a27ce 100644 --- a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java @@ -55,16 +55,16 @@ public interface WebSettingsBoundaryInterface { int getForceDarkBehavior(); @Retention(RetentionPolicy.SOURCE) - @interface WebAuthnSupport { + @interface WebauthnSupport { int NONE = 0; int APP = 1; int BROWSER = 2; } - void setWebAuthnSupport(@WebAuthnSupport int support); + void setWebauthnSupport(@WebauthnSupport int support); - @WebAuthnSupport - int getWebAuthnSupport(); + @WebauthnSupport + int getWebauthnSupport(); void setRequestedWithHeaderOriginAllowList(Set allowedOriginRules); -- cgit v1.2.3