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