tizen_tv_riscv64 = false
}
-# Enable autofill after fixing related crash.
-if (!ewk_bringup) { # FIXME: m130 bringup
- tizen_autofill = true
- if (tizen_product_tv) {
- tizen_autofill_fw = true
- }
+tizen_autofill = true
+if (tizen_product_tv) {
+ tizen_autofill_fw = true
}
if (use_ttrace) {
#include "browser/autofill/autofill_client_efl.h"
+#include "base/check_deref.h"
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
#include "browser/autofill/autocomplete_history_manager_factory.h"
namespace autofill {
+namespace payments {
+
+PaymentsAutofillClientEfl::PaymentsAutofillClientEfl(
+ ContentAutofillClient* client)
+ : client_(CHECK_DEREF(client)) {}
+
+CreditCardCvcAuthenticator& PaymentsAutofillClientEfl::GetCvcAuthenticator() {
+ if (!cvc_authenticator_) {
+ cvc_authenticator_ =
+ std::make_unique<CreditCardCvcAuthenticator>(&client_.get());
+ }
+ return *cvc_authenticator_;
+}
+
+void PaymentsAutofillClientEfl::LoadRiskData(
+ base::OnceCallback<void(const std::string&)> callback) {
+ NOTIMPLEMENTED();
+}
+
+} // namespace payments
+
// static
AutofillClientEfl* AutofillClientEfl::FromWebContents(
content::WebContents* web_contents) {
payments::PaymentsAutofillClient*
AutofillClientEfl::GetPaymentsAutofillClient() {
- NOTIMPLEMENTED();
- return nullptr;
+ return &payments_autofill_client_;
}
void AutofillClientEfl::ShowSavePasswordPopup(
#include "base/memory/weak_ptr.h"
#include "browser/autofill_popup_view_efl.h"
#include "components/autofill/content/browser/content_autofill_client.h"
+#include "components/autofill/core/browser/payments/credit_card_cvc_authenticator.h"
#include "components/autofill/core/browser/payments/local_card_migration_manager.h"
#include "components/autofill/core/browser/payments/payments_autofill_client.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
namespace autofill {
+namespace payments {
+
+class PaymentsAutofillClientEfl : public PaymentsAutofillClient {
+ public:
+ explicit PaymentsAutofillClientEfl(ContentAutofillClient* client);
+ PaymentsAutofillClientEfl(const PaymentsAutofillClientEfl&) = delete;
+ PaymentsAutofillClientEfl& operator=(const PaymentsAutofillClientEfl&) =
+ delete;
+
+ CreditCardCvcAuthenticator& GetCvcAuthenticator() override;
+ void LoadRiskData(
+ base::OnceCallback<void(const std::string&)> callback) override;
+
+ private:
+ const raw_ref<ContentAutofillClient> client_;
+ std::unique_ptr<CreditCardCvcAuthenticator> cvc_authenticator_;
+};
+
+} // namespace payments
+
class AutofillClientEfl : public ContentAutofillClient,
public content::WebContentsObserver {
public:
AutofillPopupViewEfl* GetOrCreatePopupController();
gfx::RectF GetElementBoundsInScreen(const gfx::RectF& element_bounds);
+ payments::PaymentsAutofillClientEfl payments_autofill_client_{this};
+
content::WebContents* const web_contents_;
EWebView* webview_ = nullptr;
AutofillPopupViewEfl* popup_controller_ = nullptr;
// autofill preferences
pref_registry->RegisterBooleanPref(kAutofillProfileEnabled, true);
pref_registry->RegisterBooleanPref(kAutofillCreditCardEnabled, true);
+ pref_registry->RegisterBooleanPref(kAutofillPaymentCardBenefits, true);
pref_registry->RegisterIntegerPref(kAutocompleteLastVersionRetentionPolicy,
0);
pref_registry->RegisterIntegerPref(kAutofillLastVersionDeduped, 0);