#include "chrome/browser/ui/views/autofill/payments/save_card_offer_bubble_views.h"
#include <memory>
#include "base/check.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/autofill/payments/save_card_ui.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/hats/hats_service.h"
#include "chrome/browser/ui/hats/hats_service_factory.h"
#include "chrome/browser/ui/views/accessibility/theme_tracking_non_accessible_image_view.h"
#include "chrome/browser/ui/views/autofill/payments/dialog_view_ids.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/chrome_typography.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
#include "components/autofill/core/browser/autofill_experiments.h"
#include "components/autofill/core/browser/data_model/credit_card.h"
#include "components/autofill/core/browser/metrics/autofill_metrics.h"
#include "components/autofill/core/browser/metrics/payments/credit_card_save_metrics.h"
#include "components/autofill/core/browser/payments/legal_message_line.h"
#include "components/autofill/core/browser/validation.h"
#include "components/autofill/core/common/autofill_clock.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_payments_features.h"
#include "components/strings/grit/components_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_types.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/border.h"
#include "ui/views/bubble/bubble_border.h"
#include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/bubble/tooltip_icon.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/combobox/combobox.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/separator.h"
#include "ui/views/controls/styled_label.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/controls/throbber.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/style/typography.h"
#include "ui/views/style/typography_provider.h"
namespace autofill {
namespace {
int GetLightModeBannerIdForSaveCard() { … }
int GetDarkModeBannerIdForSaveCard() { … }
}
SaveCardOfferBubbleViews::SaveCardOfferBubbleViews(
views::View* anchor_view,
content::WebContents* web_contents,
SaveCardBubbleController* controller)
: … { … }
void SaveCardOfferBubbleViews::Init() { … }
bool SaveCardOfferBubbleViews::Accept() { … }
bool SaveCardOfferBubbleViews::IsDialogButtonEnabled(
ui::mojom::DialogButton button) const { … }
void SaveCardOfferBubbleViews::AddedToWidget() { … }
void SaveCardOfferBubbleViews::ContentsChanged(
views::Textfield* sender,
const std::u16string& new_contents) { … }
SaveCardOfferBubbleViews::~SaveCardOfferBubbleViews() = default;
std::unique_ptr<views::View> SaveCardOfferBubbleViews::CreateMainContentView() { … }
std::unique_ptr<views::View>
SaveCardOfferBubbleViews::CreateRequestExpirationDateView() { … }
std::unique_ptr<views::View>
SaveCardOfferBubbleViews::CreateUploadExplanationView() { … }
std::unique_ptr<LegalMessageView>
SaveCardOfferBubbleViews::CreateLegalMessageView() { … }
std::unique_ptr<views::View> SaveCardOfferBubbleViews::CreateLoadingRow() { … }
void SaveCardOfferBubbleViews::LinkClicked(const GURL& url) { … }
void SaveCardOfferBubbleViews::ShowThrobber() { … }
}