| 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> |
| 9 |
| 8 namespace autofill { | 10 namespace autofill { |
| 9 class PersonalDataManager; | 11 class PersonalDataManager; |
| 10 } | 12 } |
| 11 | 13 |
| 12 namespace payments { | 14 namespace payments { |
| 13 | 15 |
| 14 class PaymentRequest; | 16 class PaymentRequest; |
| 15 | 17 |
| 16 class PaymentRequestDelegate { | 18 class PaymentRequestDelegate { |
| 17 public: | 19 public: |
| 18 virtual ~PaymentRequestDelegate() {} | 20 virtual ~PaymentRequestDelegate() {} |
| 19 | 21 |
| 20 // Shows the Payment Request dialog for the given |request|. | 22 // Shows the Payment Request dialog for the given |request|. |
| 21 virtual void ShowDialog(PaymentRequest* request) = 0; | 23 virtual void ShowDialog(PaymentRequest* request) = 0; |
| 22 | 24 |
| 23 // Closes the same dialog that was opened by this delegate. Must be safe to | 25 // Closes the same dialog that was opened by this delegate. Must be safe to |
| 24 // call when the dialog is not showing. | 26 // call when the dialog is not showing. |
| 25 virtual void CloseDialog() = 0; | 27 virtual void CloseDialog() = 0; |
| 26 | 28 |
| 27 // Gets the PersonalDataManager associated with this PaymentRequest flow. | 29 // Gets the PersonalDataManager associated with this PaymentRequest flow. |
| 28 // Cannot be null. | 30 // Cannot be null. |
| 29 virtual autofill::PersonalDataManager* GetPersonalDataManager() = 0; | 31 virtual autofill::PersonalDataManager* GetPersonalDataManager() = 0; |
| 32 |
| 33 virtual const std::string& GetApplicationLocale() const = 0; |
| 30 }; | 34 }; |
| 31 | 35 |
| 32 } // namespace payments | 36 } // namespace payments |
| 33 | 37 |
| 34 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ | 38 #endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_DELEGATE_H_ |
| OLD | NEW |