#include "chrome/browser/ui/views/passwords/password_save_update_view.h"
#include <algorithm>
#include <memory>
#include <utility>
#include <vector>
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/signin_promo_util.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/hats/hats_service.h"
#include "chrome/browser/ui/hats/hats_service_factory.h"
#include "chrome/browser/ui/passwords/password_dialog_prompts.h"
#include "chrome/browser/ui/passwords/passwords_model_delegate.h"
#include "chrome/browser/ui/passwords/ui_utils.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/chrome_typography.h"
#include "chrome/browser/ui/views/passwords/credentials_item_view.h"
#include "chrome/browser/ui/views/passwords/views_utils.h"
#include "chrome/browser/ui/views/promos/autofill_bubble_signin_promo_view.h"
#include "chrome/grit/branded_strings.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
#include "components/feature_engagement/public/feature_constants.h"
#include "components/feature_engagement/public/tracker.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/simple_combobox_model.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/editable_combobox/editable_combobox.h"
#include "ui/views/controls/editable_combobox/editable_password_combobox.h"
#include "ui/views/controls/styled_label.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/flex_layout.h"
#include "ui/views/view_class_properties.h"
PasswordSaveUpdateView::PasswordSaveUpdateView(
content::WebContents* web_contents,
views::View* anchor_view,
DisplayReason reason)
: … { … }
PasswordSaveUpdateView::~PasswordSaveUpdateView() = default;
PasswordBubbleControllerBase* PasswordSaveUpdateView::GetController() { … }
const PasswordBubbleControllerBase* PasswordSaveUpdateView::GetController()
const { … }
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
bool PasswordSaveUpdateView::OnCloseRequested(
views::Widget::ClosedReason close_reason) { … }
#endif
bool PasswordSaveUpdateView::CloseOrReplaceWithPromo() { … }
views::View* PasswordSaveUpdateView::GetInitiallyFocusedView() { … }
bool PasswordSaveUpdateView::IsDialogButtonEnabled(
ui::mojom::DialogButton button) const { … }
ui::ImageModel PasswordSaveUpdateView::GetWindowIcon() { … }
void PasswordSaveUpdateView::AddedToWidget() { … }
void PasswordSaveUpdateView::UpdateUsernameAndPasswordInModel() { … }
void PasswordSaveUpdateView::UpdateBubbleUIElements() { … }
std::unique_ptr<views::View> PasswordSaveUpdateView::CreateFooterView() { … }
void PasswordSaveUpdateView::AnnounceBubbleChange() { … }
void PasswordSaveUpdateView::OnContentChanged() { … }
void PasswordSaveUpdateView::UpdateFootnote() { … }
void PasswordSaveUpdateView::TogglePasswordRevealed() { … }
DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(PasswordSaveUpdateView, kPasswordBubble);