#include "chrome/browser/ui/views/payments/secure_payment_confirmation_dialog_view.h"
#include "base/metrics/histogram_functions.h"
#include "chrome/app/vector_icons/vector_icons.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/extensions/security_dialog_tracker.h"
#include "chrome/browser/ui/views/payments/payment_request_views_util.h"
#include "chrome/browser/ui/views/payments/secure_payment_confirmation_views_util.h"
#include "components/constrained_window/constrained_window_views.h"
#include "components/payments/content/payment_ui_observer.h"
#include "components/payments/content/secure_payment_confirmation_model.h"
#include "components/payments/core/features.h"
#include "components/payments/core/sizes.h"
#include "third_party/blink/public/common/features_generated.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/base/mojom/ui_base_types.mojom-shared.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/border.h"
#include "ui/views/bubble/bubble_frame_view.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/link.h"
#include "ui/views/controls/styled_label.h"
#include "ui/views/layout/box_layout_view.h"
#include "ui/views/layout/layout_provider.h"
#include "ui/views/layout/table_layout.h"
#include "ui/views/style/typography.h"
namespace payments {
SecurePaymentConfirmationNetworkAndIssuerIconsTreatment;
namespace {
class BorderedRowView : public views::View { … };
BEGIN_METADATA(…)
std::unique_ptr<views::View> CreateSpacer(
views::DistanceMetric vertical_distance) { … }
std::u16string GetTitleText(std::u16string title_text,
std::u16string relying_party_id) { … }
void UpdateProgressBarVisiblity(views::BubbleFrameView* bubble_frame_view,
bool visible) { … }
}
base::WeakPtr<SecurePaymentConfirmationView>
SecurePaymentConfirmationView::Create(
const base::WeakPtr<PaymentUIObserver> payment_ui_observer) { … }
SecurePaymentConfirmationView::SecurePaymentConfirmationView() = default;
SecurePaymentConfirmationView::~SecurePaymentConfirmationView() = default;
SecurePaymentConfirmationDialogView::SecurePaymentConfirmationDialogView(
base::WeakPtr<ObserverForTest> observer_for_test,
const base::WeakPtr<PaymentUIObserver> ui_observer_for_test)
: … { … }
SecurePaymentConfirmationDialogView::~SecurePaymentConfirmationDialogView() =
default;
void SecurePaymentConfirmationDialogView::ShowDialog(
content::WebContents* web_contents,
base::WeakPtr<SecurePaymentConfirmationModel> model,
VerifyCallback verify_callback,
CancelCallback cancel_callback,
OptOutCallback opt_out_callback) { … }
void SecurePaymentConfirmationDialogView::OnDialogAccepted() { … }
void SecurePaymentConfirmationDialogView::OnDialogCancelled() { … }
void SecurePaymentConfirmationDialogView::OnDialogClosed() { … }
void SecurePaymentConfirmationDialogView::OnOptOutClicked() { … }
void SecurePaymentConfirmationDialogView::OnModelUpdated() { … }
void SecurePaymentConfirmationDialogView::UpdateLabelView(
DialogViewID id,
const std::u16string& text) { … }
void SecurePaymentConfirmationDialogView::HideDialog() { … }
bool SecurePaymentConfirmationDialogView::ClickOptOutForTesting() { … }
bool SecurePaymentConfirmationDialogView::ShouldShowCloseButton() const { … }
bool SecurePaymentConfirmationDialogView::Accept() { … }
base::WeakPtr<SecurePaymentConfirmationDialogView>
SecurePaymentConfirmationDialogView::GetWeakPtr() { … }
void SecurePaymentConfirmationDialogView::InitChildViews() { … }
std::unique_ptr<views::View>
SecurePaymentConfirmationDialogView::CreateBodyView() { … }
std::unique_ptr<views::View> SecurePaymentConfirmationDialogView::CreateRowView(
const std::u16string& label,
DialogViewID label_id,
const std::u16string& value,
DialogViewID value_id,
const SkBitmap* icon,
DialogViewID icon_id) { … }
BEGIN_METADATA(…)
}