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_PAYMENT_REQUEST_EDIT_VIEW_CONTROLLER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_EDIT_VIEW_CONTROLLER_H_ |
6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_EDIT_VIEW_CONTROLLER_H_ | 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_EDIT_VIEW_CONTROLLER_H_ |
7 | 7 |
8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #import "ios/chrome/browser/ui/autofill/autofill_ui_type.h" | 11 #import "ios/chrome/browser/ui/autofill/autofill_ui_type.h" |
12 #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h" | 12 #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h" |
13 #import "ios/chrome/browser/ui/payments/payment_request_edit_consumer.h" | 13 #import "ios/chrome/browser/ui/payments/payment_request_edit_consumer.h" |
14 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller_dat
a_source.h" | 14 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller_dat
a_source.h" |
15 | 15 |
16 extern NSString* const kWarningMessageAccessibilityID; | 16 extern NSString* const kWarningMessageAccessibilityID; |
17 | 17 |
18 @class EditorField; | 18 @class EditorField; |
19 @class PaymentRequestEditViewController; | 19 @class PaymentRequestEditViewController; |
20 | 20 |
21 // Delegate protocol for PaymentRequestEditViewController. | 21 // Delegate protocol for PaymentRequestEditViewController. |
22 @protocol PaymentRequestEditViewControllerDelegate<NSObject> | 22 @protocol PaymentRequestEditViewControllerDelegate<NSObject> |
23 | 23 |
24 // Notifies the delegate that the user has selected |field|. | 24 // Notifies the delegate that the user has selected |field|. |
25 - (void)paymentRequestEditViewController: | 25 - (void)paymentRequestEditViewController: |
26 (PaymentRequestEditViewController*)controller | 26 (PaymentRequestEditViewController*)controller |
27 didSelectField:(EditorField*)field; | 27 didSelectField:(EditorField*)field; |
28 | 28 |
| 29 // Notifies the delegate that the user has finished editing the editor fields. |
| 30 - (void)paymentRequestEditViewController: |
| 31 (PaymentRequestEditViewController*)controller |
| 32 didFinishEditingFields:(NSArray<EditorField*>*)fields; |
| 33 |
| 34 // Notifies the delegate that the user has chosen to discard entries in the |
| 35 // editor fields and return to the previous screen. |
| 36 - (void)paymentRequestEditViewControllerDidCancel: |
| 37 (PaymentRequestEditViewController*)controller; |
| 38 |
29 @end | 39 @end |
30 | 40 |
31 // Validator protocol for PaymentRequestEditViewController. | 41 // Validator protocol for PaymentRequestEditViewController. |
32 @protocol PaymentRequestEditViewControllerValidator<NSObject> | 42 @protocol PaymentRequestEditViewControllerValidator<NSObject> |
33 | 43 |
34 // Returns the validation error string for |field|. Returns nil if there are no | 44 // Returns the validation error string for |field|. Returns nil if there are no |
35 // validation errors. | 45 // validation errors. |
36 - (NSString*)paymentRequestEditViewController: | 46 - (NSString*)paymentRequestEditViewController: |
37 (PaymentRequestEditViewController*)controller | 47 (PaymentRequestEditViewController*)controller |
38 validateField:(EditorField*)field; | 48 validateField:(EditorField*)field; |
(...skipping 21 matching lines...) Expand all Loading... |
60 validatorDelegate; | 70 validatorDelegate; |
61 | 71 |
62 // Convenience initializer. Initializes this view controller with the | 72 // Convenience initializer. Initializes this view controller with the |
63 // CollectionViewControllerStyleAppBar style and sets up the leading (cancel) | 73 // CollectionViewControllerStyleAppBar style and sets up the leading (cancel) |
64 // and the trailing (done) buttons. | 74 // and the trailing (done) buttons. |
65 - (instancetype)init; | 75 - (instancetype)init; |
66 | 76 |
67 @end | 77 @end |
68 | 78 |
69 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_EDIT_VIEW_CONTROLLER_H
_ | 79 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_EDIT_VIEW_CONTROLLER_H
_ |
OLD | NEW |