diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-01-02 17:18:00 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-01-02 17:18:00 +0000 |
commit | e2495913b28082e2192330aa87023dcfa94de1e5 (patch) | |
tree | 2fb26cd897d31fb35a60aecbeb17df04d0c64816 | |
parent | 1a51f8c0ca697b7babb73ee50ee9e82fa48a7de1 (diff) | |
parent | e5725779a479544b675f5ab06f9ed2b6b1188c48 (diff) | |
download | webview_support_interfaces-androidx-wear-compose-release.tar.gz |
Snap for 11241554 from e5725779a479544b675f5ab06f9ed2b6b1188c48 to androidx-wear-compose-releaseandroidx-wear-compose-release
Change-Id: I9ae27090c35df1351257c1d8e67f10fc3467d312
7 files changed, 82 insertions, 7 deletions
@@ -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/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..f41fcb0 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; /** @@ -63,5 +64,19 @@ 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(); } 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 30a7bfa..2a2d523 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 @@ -196,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"; @@ -245,6 +243,25 @@ 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"; + + // 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"; } |