summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-20 18:13:03 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-20 18:13:03 +0000
commit67ec3305af65f874bc0847d34059df55dcc3f7f0 (patch)
tree61d6d3d32f7e796aada5b197aae00c85ae47dd4b
parent77cc89778564ab062ac804aa47c7312d71349252 (diff)
parent100631c32aecc3b9e3e44b171ceccfe98d567956 (diff)
downloadwebview_support_interfaces-androidx-annotation-annotation-experimental-release.tar.gz
Snap for 11241848 from 100631c32aecc3b9e3e44b171ceccfe98d567956 to androidx-annotation-annotation-experimental-releaseandroidx-annotation-annotation-experimental-release
Change-Id: I41fa28e78d1865c88bcc127a0818474238694326
-rw-r--r--BUILD.gn9
-rw-r--r--proguard.flags2
-rw-r--r--src/org/chromium/support_lib_boundary/DropDataContentProviderBoundaryInterface.java33
-rw-r--r--src/org/chromium/support_lib_boundary/FeatureFlagHolderBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java9
-rw-r--r--src/org/chromium/support_lib_boundary/ProcessGlobalConfigConstants.java45
-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/ProxyControllerBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/SafeBrowsingResponseBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/ScriptHandlerBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/ServiceWorkerClientBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/ServiceWorkerControllerBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/ServiceWorkerWebSettingsBoundaryInterface.java10
-rw-r--r--src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/TracingControllerBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/WebAuthnCallbackBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/WebMessageBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/WebMessageCallbackBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/WebMessageListenerBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/WebMessagePayloadBoundaryInterface.java10
-rw-r--r--src/org/chromium/support_lib_boundary/WebMessagePortBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/WebResourceErrorBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/WebResourceRequestBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java49
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewCookieManagerBoundaryInterface.java14
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java4
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java5
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewRendererClientBoundaryInterface.java2
-rw-r--r--src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java6
-rw-r--r--src/org/chromium/support_lib_boundary/package-info.java2
-rw-r--r--src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java2
-rw-r--r--src/org/chromium/support_lib_boundary/util/Features.java71
37 files changed, 299 insertions, 51 deletions
diff --git a/BUILD.gn b/BUILD.gn
index c20f885..a7e8d2a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1,4 +1,4 @@
-# Copyright 2017 The Chromium Authors. All rights reserved.
+# Copyright 2017 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -7,9 +7,13 @@ import("//build/config/android/rules.gni")
android_library("boundary_interface_java") {
sources = [
+ "src/org/chromium/support_lib_boundary/DropDataContentProviderBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/FeatureFlagHolderBoundaryInterface.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",
@@ -29,6 +33,7 @@ android_library("boundary_interface_java") {
"src/org/chromium/support_lib_boundary/WebResourceRequestBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java",
+ "src/org/chromium/support_lib_boundary/WebViewCookieManagerBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface.java",
@@ -57,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/proguard.flags b/proguard.flags
index 4a0d580..8938347 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -1,4 +1,4 @@
-# Copyright 2018 The Chromium Authors. All rights reserved.
+# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/DropDataContentProviderBoundaryInterface.java b/src/org/chromium/support_lib_boundary/DropDataContentProviderBoundaryInterface.java
new file mode 100644
index 0000000..9e694a2
--- /dev/null
+++ b/src/org/chromium/support_lib_boundary/DropDataContentProviderBoundaryInterface.java
@@ -0,0 +1,33 @@
+// Copyright 2022 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.content.ContentProvider;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.ParcelFileDescriptor;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import java.io.FileNotFoundException;
+
+/**
+ * Boundary interface for DropDataProvider.
+ */
+public interface DropDataContentProviderBoundaryInterface {
+ boolean onCreate();
+ String[] getStreamTypes(@NonNull Uri uri, @NonNull String mimeTypeFilter);
+ ParcelFileDescriptor openFile(@NonNull ContentProvider providerWrapper, @NonNull Uri uri)
+ throws FileNotFoundException;
+ Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection,
+ @Nullable String[] selectionArgs, @Nullable String sortOrder);
+ String getType(@NonNull Uri uri);
+ Uri cache(byte[] imageBytes, String encodingFormat, String filename);
+ void setClearCachedDataIntervalMs(int milliseconds);
+ void onDragEnd(boolean imageInUse);
+ Bundle call(@NonNull String method, @Nullable String arg, @Nullable Bundle extras);
+} \ No newline at end of file
diff --git a/src/org/chromium/support_lib_boundary/FeatureFlagHolderBoundaryInterface.java b/src/org/chromium/support_lib_boundary/FeatureFlagHolderBoundaryInterface.java
index d2fa11e..df9dec7 100644
--- a/src/org/chromium/support_lib_boundary/FeatureFlagHolderBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/FeatureFlagHolderBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface.java b/src/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface.java
index 7cccfc4..3063d44 100644
--- a/src/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/IsomorphicObjectBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java b/src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java
index e2da069..689982f 100644
--- a/src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/JsReplyProxyBoundaryInterface.java
@@ -1,12 +1,19 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 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;
+
/**
* 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/ProcessGlobalConfigConstants.java b/src/org/chromium/support_lib_boundary/ProcessGlobalConfigConstants.java
new file mode 100644
index 0000000..1b8a7d2
--- /dev/null
+++ b/src/org/chromium/support_lib_boundary/ProcessGlobalConfigConstants.java
@@ -0,0 +1,45 @@
+// Copyright 2022 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 androidx.annotation.RestrictTo;
+import androidx.annotation.StringDef;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Constants for ProcessGlobalConfig shared between chromium and AndroidX.
+ */
+public final class ProcessGlobalConfigConstants {
+ private ProcessGlobalConfigConstants() {}
+
+ /** @hide */
+ @RestrictTo(RestrictTo.Scope.LIBRARY)
+ @StringDef(value = {DATA_DIRECTORY_SUFFIX, DATA_DIRECTORY_BASE_PATH, CACHE_DIRECTORY_BASE_PATH})
+ @Retention(RetentionPolicy.SOURCE)
+ @Target({ElementType.PARAMETER, ElementType.METHOD})
+ public @interface ProcessGlobalConfigMapKey {}
+
+ /**
+ * Key for the data directory suffix in the process global config map that is read in chromium
+ * via reflection into AndroidX class.
+ */
+ public static final String DATA_DIRECTORY_SUFFIX = "DATA_DIRECTORY_SUFFIX";
+
+ /**
+ * Key for the data directory base path in the process global config map that is read in
+ * chromium via reflection into AndroidX class.
+ */
+ public static final String DATA_DIRECTORY_BASE_PATH = "DATA_DIRECTORY_BASE_PATH";
+
+ /**
+ * Key for the cache directory base path in the process global config map that is read in
+ * chromium via reflection into AndroidX class.
+ */
+ public static final String CACHE_DIRECTORY_BASE_PATH = "CACHE_DIRECTORY_BASE_PATH";
+} \ No newline at end of file
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/ProxyControllerBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ProxyControllerBoundaryInterface.java
index 07888ef..ff9ed8c 100644
--- a/src/org/chromium/support_lib_boundary/ProxyControllerBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/ProxyControllerBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/SafeBrowsingResponseBoundaryInterface.java b/src/org/chromium/support_lib_boundary/SafeBrowsingResponseBoundaryInterface.java
index 737ef36..0b88b28 100644
--- a/src/org/chromium/support_lib_boundary/SafeBrowsingResponseBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/SafeBrowsingResponseBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/ScriptHandlerBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ScriptHandlerBoundaryInterface.java
index 0be98f8..7d2c8f2 100644
--- a/src/org/chromium/support_lib_boundary/ScriptHandlerBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/ScriptHandlerBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2020 The Chromium Authors. All rights reserved.
+// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/ServiceWorkerClientBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ServiceWorkerClientBoundaryInterface.java
index ed7d30d..43d09d7 100644
--- a/src/org/chromium/support_lib_boundary/ServiceWorkerClientBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/ServiceWorkerClientBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/ServiceWorkerControllerBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ServiceWorkerControllerBoundaryInterface.java
index e25e3ed..077a8fd 100644
--- a/src/org/chromium/support_lib_boundary/ServiceWorkerControllerBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/ServiceWorkerControllerBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/ServiceWorkerWebSettingsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/ServiceWorkerWebSettingsBoundaryInterface.java
index c7f60ab..f13f3a1 100644
--- a/src/org/chromium/support_lib_boundary/ServiceWorkerWebSettingsBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/ServiceWorkerWebSettingsBoundaryInterface.java
@@ -1,10 +1,10 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 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 org.chromium.support_lib_boundary.WebSettingsBoundaryInterface.RequestedWithHeaderMode;
+import java.util.Set;
/**
* Boundary interface for ServiceWorkerWebSettings.
@@ -26,7 +26,7 @@ public interface ServiceWorkerWebSettingsBoundaryInterface {
boolean getBlockNetworkLoads();
- void setRequestedWithHeaderMode(@RequestedWithHeaderMode int mode);
- @RequestedWithHeaderMode
- int getRequestedWithHeaderMode();
+ void setRequestedWithHeaderOriginAllowList(Set<String> allowedOriginRules);
+
+ Set<String> getRequestedWithHeaderOriginAllowList();
}
diff --git a/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java
index e13b77a..8b281fc 100644
--- a/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/TracingControllerBoundaryInterface.java b/src/org/chromium/support_lib_boundary/TracingControllerBoundaryInterface.java
index 84b7a1e..4f21973 100644
--- a/src/org/chromium/support_lib_boundary/TracingControllerBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/TracingControllerBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java b/src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java
index 6fd25c5..add67f7 100644
--- a/src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/WebAuthnCallbackBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebAuthnCallbackBoundaryInterface.java
index 8b6efc1..6eeaa41 100644
--- a/src/org/chromium/support_lib_boundary/WebAuthnCallbackBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebAuthnCallbackBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2021 The Chromium Authors. All rights reserved.
+// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/WebMessageBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebMessageBoundaryInterface.java
index 93782d5..d4315d2 100644
--- a/src/org/chromium/support_lib_boundary/WebMessageBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebMessageBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/WebMessageCallbackBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebMessageCallbackBoundaryInterface.java
index acac2dc..18710ce 100644
--- a/src/org/chromium/support_lib_boundary/WebMessageCallbackBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebMessageCallbackBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/WebMessageListenerBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebMessageListenerBoundaryInterface.java
index 92a393f..6019027 100644
--- a/src/org/chromium/support_lib_boundary/WebMessageListenerBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebMessageListenerBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/WebMessagePayloadBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebMessagePayloadBoundaryInterface.java
index 1a4d6b5..4635438 100644
--- a/src/org/chromium/support_lib_boundary/WebMessagePayloadBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebMessagePayloadBoundaryInterface.java
@@ -1,10 +1,11 @@
-// Copyright 2022 The Chromium Authors. All rights reserved.
+// Copyright 2022 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 androidx.annotation.IntDef;
+import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.annotation.Retention;
@@ -20,9 +21,14 @@ public interface WebMessagePayloadBoundaryInterface extends FeatureFlagHolderBou
@Nullable
String getAsString();
+ @NonNull
+ byte[] getAsArrayBuffer();
+
@Retention(RetentionPolicy.SOURCE)
- @IntDef(flag = true, value = {WebMessagePayloadType.TYPE_STRING})
+ @IntDef(flag = true,
+ value = {WebMessagePayloadType.TYPE_STRING, WebMessagePayloadType.TYPE_ARRAY_BUFFER})
@interface WebMessagePayloadType {
int TYPE_STRING = 0;
+ int TYPE_ARRAY_BUFFER = 1;
}
}
diff --git a/src/org/chromium/support_lib_boundary/WebMessagePortBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebMessagePortBoundaryInterface.java
index 3aacd26..e78adcf 100644
--- a/src/org/chromium/support_lib_boundary/WebMessagePortBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebMessagePortBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/WebResourceErrorBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebResourceErrorBoundaryInterface.java
index 953d8cb..3830415 100644
--- a/src/org/chromium/support_lib_boundary/WebResourceErrorBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebResourceErrorBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/WebResourceRequestBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebResourceRequestBoundaryInterface.java
index b91100a..30be829 100644
--- a/src/org/chromium/support_lib_boundary/WebResourceRequestBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebResourceRequestBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java
index ba2fd39..8555ea2 100644
--- a/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -9,8 +9,12 @@ 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;
/**
* Boundary interface for WebSettingsCompat.
@@ -56,15 +60,42 @@ public interface WebSettingsBoundaryInterface {
@WebAuthnSupport
int getWebAuthnSupport();
- @Retention(RetentionPolicy.SOURCE)
- @interface RequestedWithHeaderMode {
- int NO_HEADER = 0;
- int APP_PACKAGE_NAME = 1;
- }
- void setRequestedWithHeaderMode(@RequestedWithHeaderMode int mode);
- @RequestedWithHeaderMode
- int getRequestedWithHeaderMode();
+ void setRequestedWithHeaderOriginAllowList(Set<String> allowedOriginRules);
+ Set<String> getRequestedWithHeaderOriginAllowList();
void setEnterpriseAuthenticationAppLinkPolicyEnabled(boolean enabled);
boolean getEnterpriseAuthenticationAppLinkPolicyEnabled();
+
+ 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/WebViewClientBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java
index fc60168..faaf51f 100644
--- a/src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebViewClientBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/WebViewCookieManagerBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewCookieManagerBoundaryInterface.java
new file mode 100644
index 0000000..f79cd22
--- /dev/null
+++ b/src/org/chromium/support_lib_boundary/WebViewCookieManagerBoundaryInterface.java
@@ -0,0 +1,14 @@
+// Copyright 2018 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.util.List;
+
+/**
+ * Boundary interface for CookieManagerCompat.
+ */
+public interface WebViewCookieManagerBoundaryInterface {
+ List<String> getCookieInfo(String url);
+}
diff --git a/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java
index d524b31..e8b0425 100644
--- a/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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 902a04b..9d02930 100644
--- a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -18,5 +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/WebViewRendererBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface.java
index 829c6e1..db5819b 100644
--- a/src/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/WebViewRendererClientBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewRendererClientBoundaryInterface.java
index 043ca66..d7b447d 100644
--- a/src/org/chromium/support_lib_boundary/WebViewRendererClientBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebViewRendererClientBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java
index 1913b86..5d4c8ac 100644
--- a/src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -63,4 +63,8 @@ public interface WebkitToCompatConverterBoundaryInterface {
/* WebMessagePort */ Object webMessagePort);
/* WebMessagePort */ Object convertWebMessagePort(
/* SupportLibWebMessagePort */ InvocationHandler webMessagePort);
+
+ // CookieManager
+ /* SupportLibWebViewCookieManager */ InvocationHandler convertCookieManager(
+ Object cookieManager);
}
diff --git a/src/org/chromium/support_lib_boundary/package-info.java b/src/org/chromium/support_lib_boundary/package-info.java
index 053f844..1baeb36 100644
--- a/src/org/chromium/support_lib_boundary/package-info.java
+++ b/src/org/chromium/support_lib_boundary/package-info.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java b/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java
index 0be05d2..1432065 100644
--- a/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java
+++ b/src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 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.util;
diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java
index 4c38495..d2e99f3 100644
--- a/src/org/chromium/support_lib_boundary/util/Features.java
+++ b/src/org/chromium/support_lib_boundary/util/Features.java
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -105,9 +105,19 @@ public class Features {
public static final String SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL =
"SAFE_BROWSING_RESPONSE_SHOW_INTERSTITIAL";
- // WebMessage.getMessagePayload
+ /**
+ * @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";
@@ -187,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";
@@ -201,8 +208,19 @@ public class Features {
// WebSettingsCompat.getRequestedWithHeaderMode
// ServiceWorkerWebSettingsCompat.setRequestedWithHeaderMode
// ServiceWorkerWebSettingsCompat.getRequestedWithHeaderMode
+ /**
+ * @deprecated Feature was never launched. Do not reuse feature name.
+ */
+ @Deprecated()
public static final String REQUESTED_WITH_HEADER_CONTROL = "REQUESTED_WITH_HEADER_CONTROL";
+ // WebSettingsCompat.setRequestedWithHeaderAllowList
+ // WebSettingsCompat.getRequestedWithHeaderAllowList
+ // ServiceWorkerWebSettingsCompat.setRequestedWithHeaderAllowList
+ // ServiceWorkerWebSettingsCompat.getRequestedWithHeaderAllowList
+ public static final String REQUESTED_WITH_HEADER_ALLOW_LIST =
+ "REQUESTED_WITH_HEADER_ALLOW_LIST";
+
// WebViewCompat.getVariationsHeader
public static final String GET_VARIATIONS_HEADER = "GET_VARIATIONS_HEADER";
@@ -210,4 +228,47 @@ public class Features {
// WebSettingsCompat.getEnterpriseAuthenticationAppLinkPolicyEnabled
public static final String ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY =
"ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY";
+
+ // CookieManagerCompat.getCookieInfo
+ public static final String GET_COOKIE_INFO = "GET_COOKIE_INFO";
+
+ // DropDataContentProvider.onCreate
+ // DropDataContentProvider.getStreamTypes
+ // DropDataContentProvider.openFile
+ // DropDataContentProvider.query
+ // DropDataContentProvider.getType
+ // DropDataContentProvider.cache
+ // DropDataContentProvider.setClearCachedDataIntervalMs
+ // DropDataContentProvider.onDragEnd
+ // 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";
}