summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-01-17 01:13:35 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-01-17 01:13:35 +0000
commit85f7291a58b9f05f67edce88053aee85e5c2115c (patch)
tree61d6d3d32f7e796aada5b197aae00c85ae47dd4b
parent5607a4a37ab98f3b4298f13fdb5c4d2609f3a6c7 (diff)
parent100631c32aecc3b9e3e44b171ceccfe98d567956 (diff)
downloadwebview_support_interfaces-androidx-compose-material3-release.tar.gz
Snap for 11319525 from 100631c32aecc3b9e3e44b171ceccfe98d567956 to androidx-compose-material3-releaseandroidx-compose-material3-release
Change-Id: I02b9d26abbe73c34086aac6ca76f9e9b9e258c90
-rw-r--r--BUILD.gn4
-rw-r--r--src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java7
-rw-r--r--src/org/chromium/support_lib_boundary/ProfileBoundaryInterface.java21
-rw-r--r--src/org/chromium/support_lib_boundary/ProfileStoreBoundaryInterface.java18
-rw-r--r--src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java36
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/util/Features.java42
8 files changed, 123 insertions, 9 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 43ae324..a7e8d2a 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",
@@ -60,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
diff --git a/src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java b/src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java
index 046b157..689982f 100644
--- a/src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java
@@ -4,9 +4,16 @@
package org.chromium.support_lib_boundary;
+import java.lang.reflect.InvocationHandler;
+
/**
* Boundary interface for org.chromium.android_webview.WebMessageListener.
*/
public interface JsReplyProxyBoundaryInterface extends IsomorphicObjectBoundaryInterface {
+ /**
+ * Prefer using {@link #postMessageWithPayload}.
+ */
void postMessage(String message);
+
+ void postMessageWithPayload(/* MessagePayload */ InvocationHandler payload);
}
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<String> getAllProfileNames();
+
+ boolean deleteProfile(String name);
+}
diff --git a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java
index ef9eef8..8555ea2 100644
--- a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java
@@ -9,8 +9,11 @@ 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;
/**
@@ -63,5 +66,36 @@ public interface WebSettingsBoundaryInterface {
void setEnterpriseAuthenticationAppLinkPolicyEnabled(boolean enabled);
boolean getEnterpriseAuthenticationAppLinkPolicyEnabled();
- void enableRestrictSensitiveWebContent();
+ void setUserAgentMetadataFromMap(Map<String, Object> uaMetadata);
+ Map<String, Object> 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();
+
+ @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<String, @WebViewMediaIntegrityApiStatus Integer> permissionConfig);
+
+ @WebViewMediaIntegrityApiStatus
+ int getWebViewMediaIntegrityApiDefaultStatus();
+
+ Map<String, @WebViewMediaIntegrityApiStatus Integer> getWebViewMediaIntegrityApiOverrideRules();
}
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();
}
diff --git a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java
index f7c7ef7..9d02930 100644
--- a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java
@@ -18,6 +18,6 @@ public interface WebViewProviderFactoryBoundaryInterface {
/* SupportLibraryServiceWorkerController */ InvocationHandler getServiceWorkerController();
/* SupportLibraryTracingController */ InvocationHandler getTracingController();
/* SupportLibraryProxyController */ InvocationHandler getProxyController();
- void setSupportLibraryVersion(String version);
/* 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 a0e17e5..d2e99f3 100644
--- a/src/org/chromium/support_lib_boundary/util/Features.java
+++ b/src/org/chromium/support_lib_boundary/util/Features.java
@@ -105,11 +105,18 @@ 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()
+ public static final String WEB_MESSAGE_GET_MESSAGE_PAYLOAD = "WEB_MESSAGE_GET_MESSAGE_PAYLOAD";
+
+ // JsReplyProxy.postMessageWithPayload
// WebMessage.getMessagePayload
- // WebMessagePayload.getType
- // WebMessagePayload.getAsString
// WebMessagePayload.getAsArrayBuffer
- public static final String WEB_MESSAGE_GET_MESSAGE_PAYLOAD = "WEB_MESSAGE_GET_MESSAGE_PAYLOAD";
+ // WebMessagePayload.getAsString
+ // WebMessagePayload.getType
+ public static final String WEB_MESSAGE_ARRAY_BUFFER = "WEB_MESSAGE_ARRAY_BUFFER";
// WebMessagePortCompat.postMessage
public static final String WEB_MESSAGE_PORT_POST_MESSAGE = "WEB_MESSAGE_PORT_POST_MESSAGE";
@@ -190,9 +197,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";
@@ -239,6 +243,32 @@ public class Features {
// DropDataContentProvider.call
public static final String IMAGE_DRAG_DROP = "IMAGE_DRAG_DROP";
+ // ProfileStore.getInstance
+ // ProfileStore.getOrCreateProfile
+ // ProfileStore.getProfile
+ // ProfileStore.getAllProfileNames
+ // ProfileStore.deleteProfile
+ // Profile.getName
+ // 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";
+
+ // 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";
+
+ // WebSettingsCompat.setWebViewMediaIntegrityApiStatus
+ // WebSettingsCompat.getWebViewMediaIntegrityApiDefaultStatus
+ // WebSettingsCompat.getWebViewMediaIntegrityApiOverrideRules
+ public static final String WEBVIEW_MEDIA_INTEGRITY_API_STATUS = "WEBVIEW_INTEGRITY_API_STATUS";
}