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_VIEW_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_ |
6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_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/credit_card_edit_view_controller_data_so
urce.h" |
9 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller.h" | 9 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller.h" |
10 | 10 |
11 @class CreditCardEditViewController; | 11 @class CreditCardEditViewController; |
12 | 12 |
13 // Delegate protocol for CreditCardEditViewController. | 13 // Delegate protocol for CreditCardEditViewController. |
14 @protocol CreditCardEditViewControllerDelegate<NSObject> | 14 @protocol CreditCardEditViewControllerDelegate< |
| 15 PaymentRequestEditViewControllerDelegate> |
15 | 16 |
16 // Notifies the delegate that the user has finished editing the credit card | 17 // Notifies the delegate that the user has finished editing the credit card |
17 // editor fields. | 18 // editor fields. |
18 - (void)creditCardEditViewController:(CreditCardEditViewController*)controller | 19 - (void)creditCardEditViewController:(CreditCardEditViewController*)controller |
19 didFinishEditingFields:(NSArray<EditorField*>*)fields | 20 didFinishEditingFields:(NSArray<EditorField*>*)fields |
20 billingAddressID:(NSString*)billingAddressID | |
21 saveCreditCard:(BOOL)saveCard; | 21 saveCreditCard:(BOOL)saveCard; |
22 | 22 |
23 // Notifies the delegate that the user has chosen to discard entries in the | 23 // Notifies the delegate that the user has chosen to discard entries in the |
24 // credit card editor fields and return to the previous screen. | 24 // credit card editor fields and return to the previous screen. |
25 - (void)creditCardEditViewControllerDidCancel: | 25 - (void)creditCardEditViewControllerDidCancel: |
26 (CreditCardEditViewController*)controller; | 26 (CreditCardEditViewController*)controller; |
27 | 27 |
28 @end | 28 @end |
29 | 29 |
30 // View controller responsible for presenting a credit card edit form. The form | 30 // View controller responsible for presenting a credit card edit form. The form |
31 // features text fields for the field definitions passed to the initializer in | 31 // features text fields for the field definitions passed to the initializer in |
32 // addition to an item displaying the billing address associated with the credit | 32 // addition to an item displaying the billing address associated with the credit |
33 // card, if any. | 33 // card, if any. |
34 @interface CreditCardEditViewController : PaymentRequestEditViewController | 34 @interface CreditCardEditViewController : PaymentRequestEditViewController |
35 | 35 |
36 // The delegate to be notified when the user returns or finishes editing the | 36 // The delegate to be notified when the user returns or finishes editing the |
37 // credit card editor fields. | 37 // credit card editor fields. |
38 @property(nonatomic, weak) id<CreditCardEditViewControllerDelegate> delegate; | 38 @property(nonatomic, weak) id<CreditCardEditViewControllerDelegate> delegate; |
39 | 39 |
40 // The data source for this view controller. | 40 // The data source for this view controller. |
41 @property(nonatomic, weak) id<CreditCardEditViewControllerDataSource> | 41 @property(nonatomic, weak) id<CreditCardEditViewControllerDataSource> |
42 dataSource; | 42 dataSource; |
43 | 43 |
44 // The billing address GUID of the card being editted, if any. | |
45 @property(nonatomic, copy) NSString* billingAddressGUID; | |
46 | |
47 - (instancetype)init NS_DESIGNATED_INITIALIZER; | 44 - (instancetype)init NS_DESIGNATED_INITIALIZER; |
48 | 45 |
49 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style | 46 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style |
50 NS_UNAVAILABLE; | 47 NS_UNAVAILABLE; |
51 | 48 |
52 @end | 49 @end |
53 | 50 |
54 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_ | 51 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_CREDIT_CARD_EDIT_VIEW_CONTROLLER_H_ |
OLD | NEW |