#include "chrome/browser/ui/autofill/payments/desktop_payments_window_manager.h"
#include "base/check_deref.h"
#include "base/functional/callback_helpers.h"
#include "base/notreached.h"
#include "base/time/time.h"
#include "base/types/expected.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/autofill/payments/view_factory.h"
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_navigator_params.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "components/autofill/content/browser/content_autofill_client.h"
#include "components/autofill/core/browser/autofill_progress_dialog_type.h"
#include "components/autofill/core/browser/metrics/payments/payments_window_metrics.h"
#include "components/autofill/core/browser/payments/card_unmask_challenge_option.h"
#include "components/autofill/core/browser/payments/payments_autofill_client.h"
#include "components/autofill/core/browser/payments/payments_requests/unmask_card_request.h"
#include "components/autofill/core/browser/payments/payments_util.h"
#include "components/autofill/core/browser/payments/payments_window_manager_util.h"
#include "components/autofill/core/browser/ui/payments/payments_window_user_consent_dialog_controller_impl.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/web_contents.h"
#include "ui/gfx/geometry/rect.h"
#include "url/gurl.h"
namespace autofill::payments {
namespace {
Vcn3dsFlowEvent;
gfx::Rect GetPopupSizeForVcn3ds() { … }
}
DesktopPaymentsWindowManager::DesktopPaymentsWindowManager(
ContentAutofillClient* client)
: … { … }
DesktopPaymentsWindowManager::~DesktopPaymentsWindowManager() = default;
void DesktopPaymentsWindowManager::InitVcn3dsAuthentication(
Vcn3dsContext context) { … }
void DesktopPaymentsWindowManager::DidFinishNavigation(
content::NavigationHandle* navigation_handle) { … }
void DesktopPaymentsWindowManager::WebContentsDestroyed() { … }
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
void DesktopPaymentsWindowManager::OnBrowserSetLastActive(Browser* browser) { … }
#endif
void DesktopPaymentsWindowManager::CreatePopup(const GURL& url,
gfx::Rect popup_size) { … }
void DesktopPaymentsWindowManager::OnDidFinishNavigationForVcn3ds() { … }
void DesktopPaymentsWindowManager::OnWebContentsDestroyedForVcn3ds() { … }
void DesktopPaymentsWindowManager::OnDidLoadRiskDataForVcn3ds(
RedirectCompletionResult redirect_completion_result,
const std::string& risk_data) { … }
void DesktopPaymentsWindowManager::OnVcn3dsAuthenticationResponseReceived(
PaymentsAutofillClient::PaymentsRpcResult result,
const PaymentsNetworkInterface::UnmaskResponseDetails& response_details) { … }
void DesktopPaymentsWindowManager::
OnVcn3dsAuthenticationProgressDialogCancelled() { … }
void DesktopPaymentsWindowManager::ShowVcn3dsConsentDialog() { … }
void DesktopPaymentsWindowManager::OnVcn3dsConsentDialogAccepted() { … }
void DesktopPaymentsWindowManager::OnVcn3dsConsentDialogCancelled() { … }
void DesktopPaymentsWindowManager::Reset() { … }
}