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