diff options
author | Sayed <elabadysayed@chromium.org> | 2023-09-08 14:44:01 +0000 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-09-08 07:51:49 -0700 |
commit | e311e4ab96f0ffc4543791c3df48b8db124038a6 (patch) | |
tree | d5a5b2e236ac807e4b2143fb919f1f35afb3ef84 | |
parent | 35e9708a24951c2fe15a151235846a3562846c16 (diff) | |
download | webview_support_interfaces-e311e4ab96f0ffc4543791c3df48b8db124038a6.tar.gz |
[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 <elabadysayed@chromium.org>
Reviewed-by: Peter Pakkenberg <pbirk@chromium.org>
Commit-Queue: Sayed Elabady <elabadysayed@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1194097}
NOKEYCHECK=True
GitOrigin-RevId: 263c7c39d200153f3f76dc5cc97a2550aceb4745
5 files changed, 52 insertions, 0 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", 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/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"; |