| 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_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ | 5 #ifndef COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DELEGATE_H_ |
| 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ | 6 #define COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 | 10 |
| 10 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 11 #include "components/autofill/core/browser/payments/full_card_request.h" | 12 #include "components/autofill/core/browser/payments/full_card_request.h" |
| 13 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/source.h" |
| 14 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/storage.h" |
| 15 |
| 16 namespace i18n { |
| 17 namespace addressinput { |
| 18 class Storage; |
| 19 class Source; |
| 20 } // namespace addressinput |
| 21 } // namespace i18n |
| 12 | 22 |
| 13 namespace autofill { | 23 namespace autofill { |
| 14 class CreditCard; | 24 class CreditCard; |
| 15 class PersonalDataManager; | 25 class PersonalDataManager; |
| 16 } | 26 } // namespace autofill |
| 17 | 27 |
| 18 namespace payments { | 28 namespace payments { |
| 19 | 29 |
| 20 class PaymentRequest; | 30 class PaymentRequest; |
| 21 | 31 |
| 22 class PaymentRequestDelegate { | 32 class PaymentRequestDelegate { |
| 23 public: | 33 public: |
| 24 virtual ~PaymentRequestDelegate() {} | 34 virtual ~PaymentRequestDelegate() {} |
| 25 | 35 |
| 26 // Shows the Payment Request dialog for the given |request|. | 36 // Shows the Payment Request dialog for the given |request|. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 41 virtual const std::string& GetApplicationLocale() const = 0; | 51 virtual const std::string& GetApplicationLocale() const = 0; |
| 42 | 52 |
| 43 // Returns whether the user is in Incognito mode. | 53 // Returns whether the user is in Incognito mode. |
| 44 virtual bool IsIncognito() const = 0; | 54 virtual bool IsIncognito() const = 0; |
| 45 | 55 |
| 46 // Starts a FullCardRequest to unmask |credit_card|. | 56 // Starts a FullCardRequest to unmask |credit_card|. |
| 47 virtual void DoFullCardRequest( | 57 virtual void DoFullCardRequest( |
| 48 const autofill::CreditCard& credit_card, | 58 const autofill::CreditCard& credit_card, |
| 49 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate> | 59 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate> |
| 50 result_delegate) = 0; | 60 result_delegate) = 0; |
| 61 |
| 62 // Returns the source and storage for country/region data loads. |
| 63 virtual std::unique_ptr<const ::i18n::addressinput::Source> |
| 64 GetAddressInputSource() = 0; |
| 65 virtual std::unique_ptr<::i18n::addressinput::Storage> |
| 66 GetAddressInputStorage() = 0; |
| 51 }; | 67 }; |
| 52 | 68 |
| 53 } // namespace payments | 69 } // namespace payments |
| 54 | 70 |
| 55 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ | 71 #endif // COMPONENTS_PAYMENTS_CORE_PAYMENT_REQUEST_DELEGATE_H_ |
| OLD | NEW |