| 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 IOS_CHROME_BROWSER_UI_PAYMENTS_CREDIT_CARD_EDIT_MEDIATOR_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_CREDIT_CARD_EDIT_MEDIATOR_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_CREDIT_CARD_EDIT_MEDIATOR_H_ | 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_CREDIT_CARD_EDIT_MEDIATOR_H_ |
| 7 | 7 |
| 8 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller_dat
a_source.h" | 8 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller_dat
a_source.h" |
| 9 | 9 |
| 10 class PaymentRequest; | |
| 11 @protocol PaymentRequestEditConsumer; | 10 @protocol PaymentRequestEditConsumer; |
| 12 | 11 |
| 13 namespace autofill { | 12 namespace autofill { |
| 14 class AutofillProfile; | 13 class AutofillProfile; |
| 15 class CreditCard; | 14 class CreditCard; |
| 16 } // namespace autofill | 15 } // namespace autofill |
| 17 | 16 |
| 17 namespace payments { |
| 18 class PaymentRequest; |
| 19 } // namespace payments |
| 20 |
| 18 // Serves as data source for CreditCardEditViewController. | 21 // Serves as data source for CreditCardEditViewController. |
| 19 @interface CreditCardEditViewControllerMediator | 22 @interface CreditCardEditViewControllerMediator |
| 20 : NSObject<PaymentRequestEditViewControllerDataSource> | 23 : NSObject<PaymentRequestEditViewControllerDataSource> |
| 21 | 24 |
| 22 // The consumer for this object. This can change during the lifetime of this | 25 // The consumer for this object. This can change during the lifetime of this |
| 23 // object and may be nil. | 26 // object and may be nil. |
| 24 @property(nonatomic, weak) id<PaymentRequestEditConsumer> consumer; | 27 @property(nonatomic, weak) id<PaymentRequestEditConsumer> consumer; |
| 25 | 28 |
| 26 // The billing profile, if any. | 29 // The billing profile, if any. |
| 27 @property(nonatomic, assign) autofill::AutofillProfile* billingProfile; | 30 @property(nonatomic, assign) autofill::AutofillProfile* billingProfile; |
| 28 | 31 |
| 29 // Initializes this object with an instance of PaymentRequest which has a copy | 32 // Initializes this object with an instance of PaymentRequest which has a copy |
| 30 // of web::PaymentRequest as provided by the page invoking the Payment Request | 33 // of web::PaymentRequest as provided by the page invoking the Payment Request |
| 31 // API as well as |creditCard| which is the credit card to be edited, if any. | 34 // API as well as |creditCard| which is the credit card to be edited, if any. |
| 32 // This object will not take ownership of |paymentRequest| or |creditCard|. | 35 // This object will not take ownership of |paymentRequest| or |creditCard|. |
| 33 - (instancetype)initWithPaymentRequest:(PaymentRequest*)paymentRequest | 36 - (instancetype)initWithPaymentRequest:(payments::PaymentRequest*)paymentRequest |
| 34 creditCard:(autofill::CreditCard*)creditCard | 37 creditCard:(autofill::CreditCard*)creditCard |
| 35 NS_DESIGNATED_INITIALIZER; | 38 NS_DESIGNATED_INITIALIZER; |
| 36 | 39 |
| 37 - (instancetype)init NS_UNAVAILABLE; | 40 - (instancetype)init NS_UNAVAILABLE; |
| 38 | 41 |
| 39 @end | 42 @end |
| 40 | 43 |
| 41 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_CREDIT_CARD_EDIT_MEDIATOR_H_ | 44 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_CREDIT_CARD_EDIT_MEDIATOR_H_ |
| OLD | NEW |