diff options
author | Adem Derinel <derinel@google.com> | 2024-02-27 13:33:08 +0000 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-02-27 05:40:41 -0800 |
commit | b574e1a1ae360350bde138b282e828d404e21ea5 (patch) | |
tree | f11ecae27af6ce8a289d9cdc28c024649cb76712 | |
parent | 21becc1e2f5446a7bbd3d12923647cdbcc537020 (diff) | |
download | webview_support_interfaces-b574e1a1ae360350bde138b282e828d404e21ea5.tar.gz |
[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 <torne@chromium.org>
Reviewed-by: Michael van Ouwerkerk <mvanouwerkerk@chromium.org>
Commit-Queue: Adem Derinel <derinel@google.com>
Cr-Commit-Position: refs/heads/main@{#1265745}
NOKEYCHECK=True
GitOrigin-RevId: 991e4f9f43589d8451c10475ba39f4054076d560
-rw-r--r-- | src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java | 8 |
1 files 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<String> allowedOriginRules); |