1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
// 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.
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TRIGGER_SOURCE_H_
#define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TRIGGER_SOURCE_H_
#include "components/autofill/core/browser/autofill_type.h"
namespace autofill {
// Specifies the source that triggered autofilling a form. Differently from
// `AutofillSuggestionTriggerSource` this enum does not mean the action that
// triggered autofill (for example
// AutofillSuggestionTriggerSource::kFormControlElementClicked) but only the
// internal surface that provided the autofill experience (like `kPopup`) or
// internal mechanisms/business logic (like kSelectOptionsChanged). For example
// AutofillSuggestionTriggerSource::kFormControlElementClicked "action" can lead
// autofill to be "surfaced" from `kPopup` or `kFastCheckout`.
enum class AutofillTriggerSource {
kNone = 0,
// Autofill was triggered from accepting a suggestion in the Autofill popup.
kPopup = 1,
// Autofill was triggered from accepting a suggestion in the keyboard
// accessory.
kKeyboardAccessory = 2,
// Autofill was triggered from accepting a suggestion in the touch to fill for
// credit cards bottom sheet.
kTouchToFillCreditCard = 3,
// Refill was triggered from the forms seen event. This includes cases where a
// refill was triggered right after a non-refill Autofill invocation - in this
// case the original trigger source got lost.
kFormsSeen = 4,
// Refill was triggered from blink when the selected option of a <select>
// control is changed.
kSelectOptionsChanged = 5,
// Refill was triggered from blink when the input element is in the autofilled
// state and the value has been changed by JavaScript.
kJavaScriptChangedAutofilledValue = 6,
// kCreditCardCvcPopup = 7, // DEPRECATED
// Autofill was triggered from a Fast Checkout run.
kFastCheckout = 8,
// Filling/preview was triggered through a suggestion generated by manual
// fallbacks from the Chrome context menu. Contrary to regular address
// Autofill, Autofill with this trigger source fills both classified and
// unclassified form fields.
kManualFallback = 9,
// Autofill AI was triggered.
kAutofillAi = 10,
// Autofill was triggered with devtools trigger command.
kDevtools = 11,
// Autofill was triggered by successfully scanning a credit card.
kScanCreditCard = 12
};
} // namespace autofill
#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_TRIGGER_SOURCE_H_
|