#include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "build/build_config.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/views/payments/payment_request_dialog_view.h"
#include "chrome/browser/ui/views/payments/payment_request_views_util.h"
#include "components/payments/content/payment_request.h"
#include "components/strings/grit/components_strings.h"
#include "components/vector_icons/vector_icons.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/background.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/button/image_button_factory.h"
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/controls/scroll_view.h"
#include "ui/views/focus/focus_search.h"
#include "ui/views/layout/box_layout_view.h"
#include "ui/views/layout/table_layout_view.h"
#include "ui/views/metadata/view_factory.h"
#include "ui/views/painter.h"
namespace payments {
internal
}
DEFINE_VIEW_BUILDER(…)
namespace payments {
PaymentRequestSheetController::PaymentRequestSheetController(
base::WeakPtr<PaymentRequestSpec> spec,
base::WeakPtr<PaymentRequestState> state,
base::WeakPtr<PaymentRequestDialogView> dialog)
: … { … }
PaymentRequestSheetController::~PaymentRequestSheetController() = default;
std::unique_ptr<views::View> PaymentRequestSheetController::CreateView() { … }
void PaymentRequestSheetController::UpdateContentView() { … }
void PaymentRequestSheetController::UpdateHeaderView() { … }
void PaymentRequestSheetController::UpdateFocus(views::View* focused_view) { … }
void PaymentRequestSheetController::RelayoutPane() { … }
bool PaymentRequestSheetController::ShouldShowPrimaryButton() { … }
std::u16string PaymentRequestSheetController::GetPrimaryButtonLabel() { … }
PaymentRequestSheetController::ButtonCallback
PaymentRequestSheetController::GetPrimaryButtonCallback() { … }
int PaymentRequestSheetController::GetPrimaryButtonId() { … }
bool PaymentRequestSheetController::GetPrimaryButtonEnabled() { … }
bool PaymentRequestSheetController::ShouldShowSecondaryButton() { … }
std::u16string PaymentRequestSheetController::GetSecondaryButtonLabel() { … }
PaymentRequestSheetController::ButtonCallback
PaymentRequestSheetController::GetSecondaryButtonCallback() { … }
int PaymentRequestSheetController::GetSecondaryButtonId() { … }
bool PaymentRequestSheetController::ShouldShowHeaderBackArrow() { … }
std::unique_ptr<views::View>
PaymentRequestSheetController::CreateExtraFooterView() { … }
void PaymentRequestSheetController::PopulateSheetHeaderView(
views::View* container) { … }
std::unique_ptr<views::View> PaymentRequestSheetController::CreateFooterView() { … }
views::View* PaymentRequestSheetController::GetFirstFocusedView() { … }
bool PaymentRequestSheetController::GetSheetId(DialogViewID* sheet_id) { … }
bool PaymentRequestSheetController::DisplayDynamicBorderForHiddenContents() { … }
bool PaymentRequestSheetController::ShouldAccelerateEnterKey() { … }
bool PaymentRequestSheetController::CanContentViewBeScrollable() { … }
void PaymentRequestSheetController::CloseButtonPressed(const ui::Event& event) { … }
int PaymentRequestSheetController::GetHeaderHeight() { … }
void PaymentRequestSheetController::AddPrimaryButton(views::View* container) { … }
void PaymentRequestSheetController::AddSecondaryButton(views::View* container) { … }
void PaymentRequestSheetController::PerformPrimaryButtonAction(
bool* is_enabled,
const ui::Event& event) { … }
void PaymentRequestSheetController::Stop() { … }
void PaymentRequestSheetController::BackButtonPressed() { … }
}