#include "chrome/browser/ui/autofill/save_address_bubble_controller.h"
#include <array>
#include <optional>
#include <string>
#include <vector>
#include "base/check.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/autofill/ui/ui_util.h"
#include "chrome/browser/browser_process.h"
#include "chrome/grit/theme_resources.h"
#include "components/autofill/content/browser/content_autofill_client.h"
#include "components/autofill/core/browser/autofill_address_util.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/signin/public/identity_manager/account_info.h"
#include "components/strings/grit/components_strings.h"
#include "skia/ext/image_operations.h"
#include "third_party/skia/include/core/SkPath.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/image_model.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/color/color_id.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_utils.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/canvas_image_source.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_operations.h"
namespace autofill {
namespace {
class MigrationHeaderImageSource : public gfx::CanvasImageSource { … };
void MigrationHeaderImageSource::Draw(gfx::Canvas* canvas) { … }
ui::ImageModel EmbedAvatar(int background_id,
const ui::ImageModel& avatar,
const gfx::Point& position,
size_t size) { … }
}
SaveAddressBubbleController::SaveAddressBubbleController(
base::WeakPtr<AddressBubbleControllerDelegate> delegate,
content::WebContents* web_contents,
const AutofillProfile& address_profile,
bool is_migration_to_account)
: … { … }
SaveAddressBubbleController::~SaveAddressBubbleController() = default;
std::u16string SaveAddressBubbleController::GetWindowTitle() const { … }
std::optional<SaveAddressBubbleController::HeaderImages>
SaveAddressBubbleController::GetHeaderImages() const { … }
std::u16string SaveAddressBubbleController::GetBodyText() const { … }
std::u16string SaveAddressBubbleController::GetAddressSummary() const { … }
std::u16string SaveAddressBubbleController::GetProfileEmail() const { … }
std::u16string SaveAddressBubbleController::GetProfilePhone() const { … }
std::u16string SaveAddressBubbleController::GetOkButtonLabel() const { … }
AutofillClient::AddressPromptUserDecision
SaveAddressBubbleController::GetCancelCallbackValue() const { … }
std::u16string SaveAddressBubbleController::GetFooterMessage() const { … }
std::u16string SaveAddressBubbleController::GetEditorFooterMessage() const { … }
void SaveAddressBubbleController::OnUserDecision(
AutofillClient::AddressPromptUserDecision decision,
base::optional_ref<const AutofillProfile> profile) { … }
void SaveAddressBubbleController::OnEditButtonClicked() { … }
void SaveAddressBubbleController::OnBubbleClosed() { … }
}