| 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 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 } // namespace addressinput | 22 } // namespace addressinput |
| 23 } // namespace i18n | 23 } // namespace i18n |
| 24 | 24 |
| 25 namespace autofill { | 25 namespace autofill { |
| 26 class CreditCard; | 26 class CreditCard; |
| 27 class PersonalDataManager; | 27 class PersonalDataManager; |
| 28 } // namespace autofill | 28 } // namespace autofill |
| 29 | 29 |
| 30 namespace payments { | 30 namespace payments { |
| 31 | 31 |
| 32 class AddressNormalizer; |
| 32 class PaymentRequest; | 33 class PaymentRequest; |
| 33 | 34 |
| 34 class PaymentRequestDelegate { | 35 class PaymentRequestDelegate { |
| 35 public: | 36 public: |
| 36 virtual ~PaymentRequestDelegate() {} | 37 virtual ~PaymentRequestDelegate() {} |
| 37 | 38 |
| 38 // Shows the Payment Request dialog for the given |request|. | 39 // Shows the Payment Request dialog for the given |request|. |
| 39 virtual void ShowDialog(PaymentRequest* request) = 0; | 40 virtual void ShowDialog(PaymentRequest* request) = 0; |
| 40 | 41 |
| 41 // Closes the same dialog that was opened by this delegate. Must be safe to | 42 // Closes the same dialog that was opened by this delegate. Must be safe to |
| (...skipping 20 matching lines...) Expand all Loading... |
| 62 // Returns the URL of the page that is currently being displayed. | 63 // Returns the URL of the page that is currently being displayed. |
| 63 virtual const GURL& GetLastCommittedURL() const = 0; | 64 virtual const GURL& GetLastCommittedURL() const = 0; |
| 64 | 65 |
| 65 // Starts a FullCardRequest to unmask |credit_card|. | 66 // Starts a FullCardRequest to unmask |credit_card|. |
| 66 virtual void DoFullCardRequest( | 67 virtual void DoFullCardRequest( |
| 67 const autofill::CreditCard& credit_card, | 68 const autofill::CreditCard& credit_card, |
| 68 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate> | 69 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate> |
| 69 result_delegate) = 0; | 70 result_delegate) = 0; |
| 70 | 71 |
| 71 // Returns the source and storage for country/region data loads. | 72 // Returns the source and storage for country/region data loads. |
| 72 virtual std::unique_ptr<const ::i18n::addressinput::Source> | 73 virtual std::unique_ptr<::i18n::addressinput::Source> |
| 73 GetAddressInputSource() = 0; | 74 GetAddressInputSource() = 0; |
| 74 virtual std::unique_ptr<::i18n::addressinput::Storage> | 75 virtual std::unique_ptr<::i18n::addressinput::Storage> |
| 75 GetAddressInputStorage() = 0; | 76 GetAddressInputStorage() = 0; |
| 77 |
| 78 // Returns a pointer to the address normalizer to use for the duration of this |
| 79 // Payment Request. |
| 80 virtual AddressNormalizer* GetAddressNormalizer() = 0; |
| 76 }; | 81 }; |
| 77 | 82 |
| 78 } // namespace payments | 83 } // namespace payments |
| 79 | 84 |
| 80 #endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DELEGATE_H_ | 85 #endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DELEGATE_H_ |
| OLD | NEW |