| 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_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ |
| 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ | 6 #define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" |
| 11 #include "components/autofill/core/browser/payments/full_card_request.h" |
| 12 |
| 10 namespace autofill { | 13 namespace autofill { |
| 14 class CreditCard; |
| 11 class PersonalDataManager; | 15 class PersonalDataManager; |
| 12 } | 16 } |
| 13 | 17 |
| 14 namespace payments { | 18 namespace payments { |
| 15 | 19 |
| 16 class PaymentRequest; | 20 class PaymentRequest; |
| 17 | 21 |
| 18 class PaymentRequestDelegate { | 22 class PaymentRequestDelegate { |
| 19 public: | 23 public: |
| 20 virtual ~PaymentRequestDelegate() {} | 24 virtual ~PaymentRequestDelegate() {} |
| (...skipping 10 matching lines...) Expand all Loading... |
| 31 virtual void ShowErrorMessage() = 0; | 35 virtual void ShowErrorMessage() = 0; |
| 32 | 36 |
| 33 // Gets the PersonalDataManager associated with this PaymentRequest flow. | 37 // Gets the PersonalDataManager associated with this PaymentRequest flow. |
| 34 // Cannot be null. | 38 // Cannot be null. |
| 35 virtual autofill::PersonalDataManager* GetPersonalDataManager() = 0; | 39 virtual autofill::PersonalDataManager* GetPersonalDataManager() = 0; |
| 36 | 40 |
| 37 virtual const std::string& GetApplicationLocale() const = 0; | 41 virtual const std::string& GetApplicationLocale() const = 0; |
| 38 | 42 |
| 39 // Returns whether the user is in Incognito mode. | 43 // Returns whether the user is in Incognito mode. |
| 40 virtual bool IsIncognito() const = 0; | 44 virtual bool IsIncognito() const = 0; |
| 45 |
| 46 // Starts a FullCardRequest to unmask |credit_card|. |
| 47 virtual void DoFullCardRequest( |
| 48 const autofill::CreditCard& credit_card, |
| 49 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate> |
| 50 result_delegate) = 0; |
| 41 }; | 51 }; |
| 42 | 52 |
| 43 } // namespace payments | 53 } // namespace payments |
| 44 | 54 |
| 45 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ | 55 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ |
| OLD | NEW |