diff options
author | Nate Fischer <ntfschr@chromium.org> | 2018-04-05 17:16:45 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2018-04-05 17:16:45 +0000 |
commit | 64348924f42bcde3c7d555fe9ac0df1f1d5c3989 (patch) | |
tree | 473dfaeb592447c3129d27bb4baa7e6f53c5c0a4 | |
parent | f21c34d077fcd2f8360ce297e298a7c5ef2efa83 (diff) | |
download | webview_support_interfaces-64348924f42bcde3c7d555fe9ac0df1f1d5c3989.tar.gz |
AW: add boundary interface for callback feature detection
This adds the FeatureFlagHolderBoundaryInterface. Support-lib-created
callback objects will implement this to indicate, on a per-object
granularity, which features they support.
Doc: http://go/wv-callback-feature-detection
Bug: 752521
Test: N/A
Change-Id: Iac86615052069d091a0db66f41bc9c852498815f
Reviewed-on: https://chromium-review.googlesource.com/997021
Reviewed-by: Gustav Sennton <gsennton@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#548462}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 986597eeb3fe7b0cff59d50f8f9e42e3c9a4b38c
-rw-r--r-- | BUILD.gn | 1 | ||||
-rw-r--r-- | src/org/chromium/support_lib_boundary/FeatureFlagHolderBoundaryInterface.java | 25 |
2 files changed, 26 insertions, 0 deletions
@@ -7,6 +7,7 @@ import("//build/config/android/rules.gni") android_library("boundary_interface_java") { java_files = [ + "src/org/chromium/support_lib_boundary/FeatureFlagHolderBoundaryInterface.java", "src/org/chromium/support_lib_boundary/SafeBrowsingResponseBoundaryInterface.java", "src/org/chromium/support_lib_boundary/ServiceWorkerClientBoundaryInterface.java", "src/org/chromium/support_lib_boundary/ServiceWorkerControllerBoundaryInterface.java", diff --git a/src/org/chromium/support_lib_boundary/FeatureFlagHolderBoundaryInterface.java b/src/org/chromium/support_lib_boundary/FeatureFlagHolderBoundaryInterface.java new file mode 100644 index 0000000..d2fa11e --- /dev/null +++ b/src/org/chromium/support_lib_boundary/FeatureFlagHolderBoundaryInterface.java @@ -0,0 +1,25 @@ +// 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; + +/** + * Boundary interface to be implemented by any type which is constructed on the support library + * side (such as callback classes). This interface is a way for the instance to declare which + * {@link org.chromium.support_lib_boundary.util.Features} it supports (this may vary between + * instances if the app uses multiple versions of the support library). + * + * This need only be implemented by objects created on the support library side, since we know any + * objects created on the chromium side have the same feature list as the WebView APK itself (as + * returned by {@link WebViewProviderFactoryBoundaryInterface#getSupportedFeatures}). + */ +public interface FeatureFlagHolderBoundaryInterface { + /** + * Indicate the list of {@link org.chromium.support_lib_boundary.util.Features} supported by + * this object. + * + * @return The supported features. + */ + String[] getSupportedFeatures(); +} |