summaryrefslogtreecommitdiff
path: root/chromium/components/payments/core/payment_request_delegate.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/payments/core/payment_request_delegate.h')
-rw-r--r--chromium/components/payments/core/payment_request_delegate.h46
1 files changed, 33 insertions, 13 deletions
diff --git a/chromium/components/payments/core/payment_request_delegate.h b/chromium/components/payments/core/payment_request_delegate.h
index aab278af6f2..53a44c70626 100644
--- a/chromium/components/payments/core/payment_request_delegate.h
+++ b/chromium/components/payments/core/payment_request_delegate.h
@@ -10,23 +10,24 @@
#include "base/memory/weak_ptr.h"
#include "components/autofill/core/browser/payments/full_card_request.h"
-#include "third_party/libaddressinput/src/cpp/include/libaddressinput/source.h"
-#include "third_party/libaddressinput/src/cpp/include/libaddressinput/storage.h"
-namespace i18n {
-namespace addressinput {
-class Storage;
-class Source;
-} // namespace addressinput
-} // namespace i18n
+class GURL;
namespace autofill {
class CreditCard;
class PersonalDataManager;
+class RegionDataLoader;
} // namespace autofill
+class PrefService;
+
+namespace ukm {
+class UkmRecorder;
+} // namespace ukm
+
namespace payments {
+class AddressNormalizer;
class PaymentRequest;
class PaymentRequestDelegate {
@@ -53,17 +54,36 @@ class PaymentRequestDelegate {
// Returns whether the user is in Incognito mode.
virtual bool IsIncognito() const = 0;
+ // Returns true if the SSL certificate is valid. Should be called only for
+ // cryptographic schemes.
+ virtual bool IsSslCertificateValid() = 0;
+
+ // Returns the URL of the page that is currently being displayed.
+ virtual const GURL& GetLastCommittedURL() const = 0;
+
// Starts a FullCardRequest to unmask |credit_card|.
virtual void DoFullCardRequest(
const autofill::CreditCard& credit_card,
base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate>
result_delegate) = 0;
- // Returns the source and storage for country/region data loads.
- virtual std::unique_ptr<const ::i18n::addressinput::Source>
- GetAddressInputSource() = 0;
- virtual std::unique_ptr<::i18n::addressinput::Storage>
- GetAddressInputStorage() = 0;
+ // Returns a pointer to the address normalizer to use for the duration of this
+ // Payment Request.
+ virtual AddressNormalizer* GetAddressNormalizer() = 0;
+
+ // Creates a new region data loader that will self delete, or a test mock.
+ virtual autofill::RegionDataLoader* GetRegionDataLoader() = 0;
+
+ // Returns a pointer to the UKM service.
+ virtual ukm::UkmRecorder* GetUkmRecorder() = 0;
+
+ // Returns the user's signed-in email address, or empty string if not signed
+ // in.
+ virtual std::string GetAuthenticatedEmail() const = 0;
+
+ // Gets the pref service for the browser context associated with this
+ // PaymentRequest.
+ virtual PrefService* GetPrefService() = 0;
};
} // namespace payments