chromium/chrome/browser/ui/views/payments/payment_request_dialog_view.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ui/views/payments/payment_request_dialog_view.h"

#include <utility>

#include "base/functional/bind.h"
#include "base/logging.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/extensions/security_dialog_tracker.h"
#include "chrome/browser/ui/views/payments/contact_info_editor_view_controller.h"
#include "chrome/browser/ui/views/payments/error_message_view_controller.h"
#include "chrome/browser/ui/views/payments/order_summary_view_controller.h"
#include "chrome/browser/ui/views/payments/payment_handler_web_flow_view_controller.h"
#include "chrome/browser/ui/views/payments/payment_method_view_controller.h"
#include "chrome/browser/ui/views/payments/payment_request_views_util.h"
#include "chrome/browser/ui/views/payments/payment_sheet_view_controller.h"
#include "chrome/browser/ui/views/payments/profile_list_view_controller.h"
#include "chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h"
#include "chrome/browser/ui/views/payments/shipping_option_view_controller.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/constrained_window/constrained_window_views.h"
#include "components/payments/content/payment_request.h"
#include "components/strings/grit/components_strings.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.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/views/accessibility/view_accessibility.h"
#include "ui/views/background.h"
#include "ui/views/controls/label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/layout_provider.h"

namespace payments {

namespace {

// This function creates an instance of a PaymentRequestSheetController
// subclass of concrete type |Controller|, passing it non-owned pointers to
// |dialog| and the |request| that initiated that dialog. |map| should be owned
// by |dialog|.
std::unique_ptr<views::View> CreateViewAndInstallController(
    std::unique_ptr<PaymentRequestSheetController> controller,
    payments::ControllerMap* map) {}

}  // namespace

// static
base::WeakPtr<PaymentRequestDialogView> PaymentRequestDialogView::Create(
    base::WeakPtr<PaymentRequest> request,
    base::WeakPtr<PaymentRequestDialogView::ObserverForTest> observer) {}

void PaymentRequestDialogView::RequestFocus() {}

views::View* PaymentRequestDialogView::GetInitiallyFocusedView() {}

void PaymentRequestDialogView::OnDialogClosed() {}

bool PaymentRequestDialogView::ShouldShowCloseButton() const {}

void PaymentRequestDialogView::ShowDialog() {}

void PaymentRequestDialogView::CloseDialog() {}

void PaymentRequestDialogView::ShowErrorMessage() {}

void PaymentRequestDialogView::ShowProcessingSpinner() {}

bool PaymentRequestDialogView::IsInteractive() const {}

void PaymentRequestDialogView::ShowPaymentHandlerScreen(
    const GURL& url,
    PaymentHandlerOpenWindowCallback callback) {}

void PaymentRequestDialogView::RetryDialog() {}

void PaymentRequestDialogView::ConfirmPaymentForTesting() {}

bool PaymentRequestDialogView::ClickOptOutForTesting() {}

void PaymentRequestDialogView::OnStartUpdating(
    PaymentRequestSpec::UpdateReason reason) {}

void PaymentRequestDialogView::OnSpecUpdated() {}

void PaymentRequestDialogView::OnInitialized(
    InitializationTask* initialization_task) {}

void PaymentRequestDialogView::Pay() {}

void PaymentRequestDialogView::GoBack() {}

void PaymentRequestDialogView::GoBackToPaymentSheet(bool animate) {}

void PaymentRequestDialogView::ShowContactProfileSheet() {}

void PaymentRequestDialogView::ShowOrderSummary() {}

void PaymentRequestDialogView::ShowPaymentMethodSheet() {}

void PaymentRequestDialogView::ShowShippingProfileSheet() {}

void PaymentRequestDialogView::ShowShippingOptionSheet() {}

void PaymentRequestDialogView::ShowShippingAddressEditor(
    BackNavigationType back_navigation_type,
    base::OnceClosure on_edited,
    base::OnceCallback<void(const autofill::AutofillProfile&)> on_added,
    autofill::AutofillProfile* profile) {}

void PaymentRequestDialogView::ShowContactInfoEditor(
    BackNavigationType back_navigation_type,
    base::OnceClosure on_edited,
    base::OnceCallback<void(const autofill::AutofillProfile&)> on_added,
    autofill::AutofillProfile* profile) {}

void PaymentRequestDialogView::EditorViewUpdated() {}

void PaymentRequestDialogView::HideProcessingSpinner() {}

Profile* PaymentRequestDialogView::GetProfile() {}

PaymentRequestDialogView::PaymentRequestDialogView(
    base::WeakPtr<PaymentRequest> request,
    base::WeakPtr<PaymentRequestDialogView::ObserverForTest> observer)
    :{}

PaymentRequestDialogView::~PaymentRequestDialogView() = default;

void PaymentRequestDialogView::OnDialogOpened() {}

void PaymentRequestDialogView::ShowInitialPaymentSheet() {}

void PaymentRequestDialogView::SetupSpinnerOverlay() {}

gfx::Size PaymentRequestDialogView::CalculatePreferredSize(
    const views::SizeBounds& /*available_size*/) const {}

int PaymentRequestDialogView::GetActualPaymentHandlerDialogHeight() const {}

int PaymentRequestDialogView::GetActualDialogWidth() const {}

void PaymentRequestDialogView::OnPaymentHandlerTitleSet() {}

void PaymentRequestDialogView::ViewHierarchyChanged(
    const views::ViewHierarchyChangedDetails& details) {}

void PaymentRequestDialogView::ResizeDialogWindow() {}

BEGIN_METADATA()

}  // namespace payments