0

[Autofill] Expose Autofill features to webview.

This CL exposes autofill features to webview and adds feature toggles
for structures names and addresses.

Change-Id: Ic772422320545f1a4009d1fb63379ef5496ea4bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3100127
Reviewed-by: Michael Bai <michaelbai@chromium.org>
Commit-Queue: Matthias Körber <koerber@google.com>
Cr-Commit-Position: refs/heads/main@{#913148}
This commit is contained in:
Matthias Körber
2021-08-18 20:51:45 +00:00
committed by Chromium LUCI CQ
parent 436d2b7c97
commit 7962fc2287
5 changed files with 45 additions and 0 deletions
android_webview
BUILD.gn
java
src
org
chromium
components/autofill/android
tools/metrics/histograms

@ -774,6 +774,7 @@ android_library("common_java") {
deps = [
"//base:base_java",
"//cc/base:cc_base_java",
"//components/autofill/android:autofill_features_java",
"//components/metrics:metrics_java",
"//components/power_scheduler:power_scheduler_java",
"//components/viz:viz_java",

@ -7,6 +7,7 @@ package org.chromium.android_webview.common;
import org.chromium.base.BaseSwitches;
import org.chromium.blink_public.common.BlinkFeatures;
import org.chromium.cc.base.CcSwitches;
import org.chromium.components.autofill.AutofillFeatures;
import org.chromium.components.metrics.MetricsSwitches;
import org.chromium.components.power_scheduler.PowerSchedulerFeatures;
import org.chromium.components.viz.common.VizFeatures;
@ -141,6 +142,13 @@ public final class ProductionSupportedFlagList {
Flag.baseFeature(BlinkFeatures.GMS_CORE_EMOJI,
"Enables retrieval of the emoji font through GMS Core "
+ "improving emoji glyph coverage."),
Flag.baseFeature(AutofillFeatures.AUTOFILL_ENABLE_SUPPORT_FOR_MORE_STRUCTURE_IN_NAMES,
"Enables support for names with a rich structure including multiple last "
+ "names."),
Flag.baseFeature(
AutofillFeatures.AUTOFILL_ENABLE_SUPPORT_FOR_MORE_STRUCTURE_IN_ADDRESSES,
"Enables support for address with a rich structure including separate street "
+ "names and house numberse."),
Flag.baseFeature(
NetworkServiceFeatures.TRUST_TOKENS, "Enables the prototype Trust Tokens API."),
Flag.baseFeature(AwFeatures.WEBVIEW_APPS_PACKAGE_NAMES_ALLOWLIST,

@ -36,6 +36,13 @@ java_cpp_enum("autofill_core_browser_java_enums") {
]
}
java_cpp_features("java_features_srcjar") {
visibility = [ ":*" ]
sources = [ "//components/autofill/core/common/autofill_features.cc" ]
template =
"//components/autofill/android/java_templates/AutofillFeatures.java.tmpl"
}
android_library("full_autofill_java") {
deps = [
":autofill_java_resources",
@ -59,6 +66,11 @@ android_library("full_autofill_java") {
resources_package = "org.chromium.components.autofill"
}
# A minimal library used to expose autofill features to webview.
android_library("autofill_features_java") {
srcjar_deps = [ ":java_features_srcjar" ]
}
# A library containing the minimal deps for payments, so that ui_java_resources
# doesn't have to be pulled in.
android_library("payments_autofill_java") {

@ -0,0 +1,16 @@
// Copyright 2021 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.components.autofill;
/**
* Contains features that are specific to the autofill component.
*/
public final class AutofillFeatures {{
{NATIVE_FEATURES}
// Prevents instantiation.
private AutofillFeatures() {{}}
}}

@ -48449,6 +48449,8 @@ from previous Chrome versions.
<int value="-832561975" label="enable-picture-in-picture"/>
<int value="-831066457" label="IncognitoBrandConsistencyForDesktop:disabled"/>
<int value="-825942229" label="tab-management-experiment-type-elderberry"/>
<int value="-825747847"
label="AutofillEnableSupportForMoreStructureInAddresses:enabled"/>
<int value="-824199802" label="ContextualSearchSimplifiedServer:enabled"/>
<int value="-823394398" label="TargetEmbeddingLookalikes:enabled"/>
<int value="-823165021" label="MaterialDesignUserMenu:enabled"/>
@ -48618,6 +48620,8 @@ from previous Chrome versions.
<int value="-695687521" label="double-buffer-compositing"/>
<int value="-694622753" label="VizHitTest:disabled"/>
<int value="-694187898" label="MashOopViz:disabled"/>
<int value="-693881124"
label="AutofillEnableSupportForMoreStructureInNames:disabled"/>
<int value="-688003116" label="FocusFollowsCursor:enabled"/>
<int value="-687302378" label="BluetoothFixA2dpPacketSize:enabled"/>
<int value="-686788480" label="OsSettingsAppNotificationsPage:enabled"/>
@ -50757,6 +50761,8 @@ from previous Chrome versions.
<int value="1070449228" label="ContextualSuggestionsCarousel:enabled"/>
<int value="1070840417" label="ChromeColors:enabled"/>
<int value="1071520357" label="WebAuthenticationTouchId:enabled"/>
<int value="1071962531"
label="AutofillEnableSupportForMoreStructureInAddresses:disabled"/>
<int value="1072010558" label="NTPModernLayout:disabled"/>
<int value="1072517479" label="ImprovedCookieControls:enabled"/>
<int value="1074359194" label="UseSuggestionsEvenIfFew:enabled"/>
@ -51562,6 +51568,8 @@ from previous Chrome versions.
<int value="1707873180"
label="OmniboxOnFocusSuggestionsContextualWebAllowSRP:disabled"/>
<int value="1708118086" label="TextFragmentAnchor:disabled"/>
<int value="1710630380"
label="AutofillEnableSupportForMoreStructureInNames:enabled"/>
<int value="1711286384" label="ContextMenuCopyImage:disabled"/>
<int value="1712622545" label="Memories:disabled"/>
<int value="1712697097" label="QuickAnswersV2:disabled"/>