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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_BUBBLE_HANDLER_IMPL_H_
#define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_BUBBLE_HANDLER_IMPL_H_
#include "base/functional/callback_forward.h"
#include "base/memory/raw_ptr.h"
#include "base/scoped_observation.h"
#include "chrome/browser/ui/autofill/autofill_bubble_handler.h"
#include "components/autofill/core/browser/ui/payments/payments_ui_closed_reasons.h"
#include "components/autofill/core/browser/ui/payments/save_payment_method_and_virtual_card_enroll_confirmation_ui_params.h"
#include "components/signin/public/base/signin_buildflags.h"
class PageActionIconView;
class ToolbarButtonProvider;
namespace content {
class WebContents;
}
namespace views {
class View;
}
namespace autofill {
class AutofillBubbleBase;
class FilledCardInformationBubbleController;
class SaveCardBubbleController;
class IbanBubbleController;
enum class IbanBubbleType;
class AutofillBubbleHandlerImpl : public AutofillBubbleHandler {
public:
explicit AutofillBubbleHandlerImpl(
ToolbarButtonProvider* toolbar_button_provider);
AutofillBubbleHandlerImpl(const AutofillBubbleHandlerImpl&) = delete;
AutofillBubbleHandlerImpl& operator=(const AutofillBubbleHandlerImpl&) =
delete;
~AutofillBubbleHandlerImpl() override;
// AutofillBubbleHandler:
AutofillBubbleBase* ShowSaveCreditCardBubble(
content::WebContents* web_contents,
SaveCardBubbleController* controller,
bool is_user_gesture) override;
AutofillBubbleBase* ShowIbanBubble(content::WebContents* web_contents,
IbanBubbleController* controller,
bool is_user_gesture,
IbanBubbleType bubble_type) override;
AutofillBubbleBase* ShowOfferNotificationBubble(
content::WebContents* contents,
OfferNotificationBubbleController* controller,
bool is_user_gesture) override;
AutofillBubbleBase* ShowSaveAutofillAiDataBubble(
content::WebContents* web_contents,
autofill_ai::SaveOrUpdateAutofillAiDataController* controller) override;
AutofillBubbleBase* ShowSaveAddressProfileBubble(
content::WebContents* web_contents,
std::unique_ptr<SaveAddressBubbleController> controller,
bool is_user_gesture) override;
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
AutofillBubbleBase* ShowAddressSignInPromo(
content::WebContents* web_contents,
const AutofillProfile& autofill_profile) override;
#endif // BUILDFLAG(ENABLE_DICE_SUPPORT)
AutofillBubbleBase* ShowUpdateAddressProfileBubble(
content::WebContents* web_contents,
std::unique_ptr<UpdateAddressBubbleController> controller,
bool is_user_gesture) override;
AutofillBubbleBase* ShowFilledCardInformationBubble(
content::WebContents* web_contents,
FilledCardInformationBubbleController* controller,
bool is_user_gesture) override;
AutofillBubbleBase* ShowVirtualCardEnrollBubble(
content::WebContents* web_contents,
VirtualCardEnrollBubbleController* controller,
bool is_user_gesture) override;
AutofillBubbleBase* ShowVirtualCardEnrollConfirmationBubble(
content::WebContents* web_contents,
VirtualCardEnrollBubbleController* controller) override;
AutofillBubbleBase* ShowMandatoryReauthBubble(
content::WebContents* web_contents,
MandatoryReauthBubbleController* controller,
bool is_user_gesture,
MandatoryReauthBubbleType bubble_type) override;
AutofillBubbleBase* ShowSaveCardConfirmationBubble(
content::WebContents* web_contents,
SaveCardBubbleController* controller) override;
AutofillBubbleBase* ShowSaveIbanConfirmationBubble(
content::WebContents* web_contents,
IbanBubbleController* controller) override;
private:
// Show the save card and virtual card enrollment confirmation bubble.
AutofillBubbleBase* ShowSaveCardAndVirtualCardEnrollConfirmationBubble(
views::View* anchor_view,
content::WebContents* web_contents,
base::OnceCallback<void(PaymentsUiClosedReason)> controller_hide_callback,
PageActionIconView* icon_view,
SavePaymentMethodAndVirtualCardEnrollConfirmationUiParams ui_params);
raw_ptr<ToolbarButtonProvider> toolbar_button_provider_ = nullptr;
};
} // namespace autofill
#endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_BUBBLE_HANDLER_IMPL_H_
|