Snap for 4651078 from 7a06470db32251f50f63e68a149515758dd4883b to pi-release

Change-Id: Ic02f3aec6a1fa136fc5c7f46d1df65983b959491
diff --git a/BUILD.gn b/BUILD.gn
index bc1fcb3..dda7b79 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -8,12 +8,14 @@
 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 @@
     /* 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";
+}