Snap for 10791035 from 9ba8a14449290f3f996488ac99e92cfedff35b9d to androidx-activity-release
Change-Id: Ie4afe63ab91dbf3e11431762fc05408b1dafc3d1
diff --git a/BUILD.gn b/BUILD.gn
index 43ae324..7d2687a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -12,6 +12,8 @@
"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/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..987dd78 100644
--- a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java
@@ -11,6 +11,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+import java.util.Map;
import java.util.Set;
/**
@@ -63,5 +64,6 @@
void setEnterpriseAuthenticationAppLinkPolicyEnabled(boolean enabled);
boolean getEnterpriseAuthenticationAppLinkPolicyEnabled();
- void enableRestrictSensitiveWebContent();
+ void setUserAgentMetadataFromMap(Map<String, Object> uaMetadata);
+ Map<String, Object> getUserAgentMetadataMap();
}
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 @@
/* 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..d4a5250 100644
--- a/src/org/chromium/support_lib_boundary/util/Features.java
+++ b/src/org/chromium/support_lib_boundary/util/Features.java
@@ -105,12 +105,19 @@
public static final String SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL =
"SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL";
- // WebMessage.getMessagePayload
- // WebMessagePayload.getType
- // WebMessagePayload.getAsString
- // WebMessagePayload.getAsArrayBuffer
+ /**
+ * @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.getAsArrayBuffer
+ // 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 @@
// 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,21 @@
// 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";
+
+ // WebSettingsCompat.setUserAgentMetadataFromMap
+ // WebSettingsCompat.getUserAgentMetadataMap
+ public static final String USER_AGENT_METADATA = "USER_AGENT_METADATA";
}