summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-03-13 09:46:48 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-03-13 09:46:48 +0000
commitf0900db1de0586a953b61841be3f466ec851006f (patch)
tree2ddb305b67b3a4dbeb0790a6fb5b19ad6df030c6
parent63ee596e22ce514adaa036f3b9c4222d5c375560 (diff)
parent7a06470db32251f50f63e68a149515758dd4883b (diff)
downloadwebview_support_interfaces-f0900db1de0586a953b61841be3f466ec851006f.tar.gz
Snap for 4651078 from 7a06470db32251f50f63e68a149515758dd4883b to pi-release
Change-Id: Ic02f3aec6a1fa136fc5c7f46d1df65983b959491
-rw-r--r--BUILD.gn2
-rw-r--r--src/org/chromium/support_lib_boundary/SupportLibraryInfoBoundaryInterface.java12
-rw-r--r--src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java1
-rw-r--r--src/org/chromium/support_lib_boundary/util/Features.java18
4 files changed, 33 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn
index bc1fcb3..dda7b79 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -8,12 +8,14 @@ import("//build/config/android/rules.gni")
android_library("boundary_interface_java") {
java_files = [
"src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java",
+ "src/org/chromium/support_lib_boundary/SupportLibraryInfoBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/WebSettingsBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/WebViewProviderBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java",
"src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java",
+ "src/org/chromium/support_lib_boundary/util/Features.java",
]
proguard_configs = [ "proguard.flags" ]
diff --git a/src/org/chromium/support_lib_boundary/SupportLibraryInfoBoundaryInterface.java b/src/org/chromium/support_lib_boundary/SupportLibraryInfoBoundaryInterface.java
new file mode 100644
index 0000000..11a141f
--- /dev/null
+++ b/src/org/chromium/support_lib_boundary/SupportLibraryInfoBoundaryInterface.java
@@ -0,0 +1,12 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// 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;
+
+/**
+ * Contains information about the WebView support library side, e.g. which features are supported on
+ * that side.
+ * This is passed to the WebView APK code on support library initialization.
+ */
+public interface SupportLibraryInfoBoundaryInterface { String[] getSupportedFeatures(); }
diff --git a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java
index e868f7a..094e2cf 100644
--- a/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java
+++ b/src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java
@@ -14,4 +14,5 @@ public interface WebViewProviderFactoryBoundaryInterface {
/* SupportLibraryWebViewChromium */ InvocationHandler createWebView(WebView webview);
/* SupportLibWebkitToCompatConverter */ InvocationHandler getWebkitToCompatConverter();
/* StaticsAdapter */ InvocationHandler getStatics();
+ String[] getSupportedFeatures();
}
diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java
new file mode 100644
index 0000000..d74ea55
--- /dev/null
+++ b/src/org/chromium/support_lib_boundary/util/Features.java
@@ -0,0 +1,18 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// 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;
+
+/**
+ * Class containing all the features the support library can support.
+ * This class lives in the boundary interface directory so that the Android Support Library and
+ * Chromium can share its definition.
+ */
+public class Features {
+ // This class just contains constants representing features.
+ private Features() {}
+
+ // WebViewCompat.postVisualStateCallback
+ public static final String VISUAL_STATE_CALLBACK = "VISUAL_STATE_CALLBACK";
+}