OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DELEGATE_H_ | 5 #ifndef COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DELEGATE_H_ |
6 #define COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DELEGATE_H_ | 6 #define COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DELEGATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "components/autofill/core/browser/payments/full_card_request.h" | 12 #include "components/autofill/core/browser/payments/full_card_request.h" |
13 | 13 |
14 class GURL; | 14 class GURL; |
15 | 15 |
16 namespace autofill { | 16 namespace autofill { |
17 class CreditCard; | 17 class CreditCard; |
18 class PersonalDataManager; | 18 class PersonalDataManager; |
19 class RegionDataLoader; | 19 class RegionDataLoader; |
20 } // namespace autofill | 20 } // namespace autofill |
21 | 21 |
| 22 namespace content { |
| 23 class BrowserContext; |
| 24 } |
| 25 |
22 namespace ukm { | 26 namespace ukm { |
23 class UkmService; | 27 class UkmService; |
24 } // namespace ukm | 28 } // namespace ukm |
25 | 29 |
26 namespace payments { | 30 namespace payments { |
27 | 31 |
28 class AddressNormalizer; | 32 class AddressNormalizer; |
29 class PaymentRequest; | 33 class PaymentRequest; |
30 | 34 |
31 class PaymentRequestDelegate { | 35 class PaymentRequestDelegate { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 71 |
68 // Returns a pointer to the address normalizer to use for the duration of this | 72 // Returns a pointer to the address normalizer to use for the duration of this |
69 // Payment Request. | 73 // Payment Request. |
70 virtual AddressNormalizer* GetAddressNormalizer() = 0; | 74 virtual AddressNormalizer* GetAddressNormalizer() = 0; |
71 | 75 |
72 // Creates a new region data loader that will self delete, or a test mock. | 76 // Creates a new region data loader that will self delete, or a test mock. |
73 virtual autofill::RegionDataLoader* GetRegionDataLoader() = 0; | 77 virtual autofill::RegionDataLoader* GetRegionDataLoader() = 0; |
74 | 78 |
75 // Returns a pointer to the UKM service. | 79 // Returns a pointer to the UKM service. |
76 virtual ukm::UkmService* GetUkmService() = 0; | 80 virtual ukm::UkmService* GetUkmService() = 0; |
| 81 |
| 82 // Returns the user's signed-in email address, or empty string if not signed |
| 83 // in. |
| 84 virtual std::string GetAuthenticatedEmail() const = 0; |
| 85 |
| 86 // Returns the BrowserContext associated with this PaymentRequest. |
| 87 virtual content::BrowserContext* GetBrowserContext() = 0; |
| 88 |
| 89 // Sets the profile pref that represents the first ever transaction being |
| 90 // completed to true. |
| 91 virtual void MarkFirstTransactionAsCompleted() = 0; |
77 }; | 92 }; |
78 | 93 |
79 } // namespace payments | 94 } // namespace payments |
80 | 95 |
81 #endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DELEGATE_H_ | 96 #endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DELEGATE_H_ |
OLD | NEW |