| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_EDIT_VIEW_CONTROLLER_INTERNA
L_H_ |
| 6 #define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_EDIT_VIEW_CONTROLLER_INTERNA
L_H_ |
| 7 |
| 8 #import "ios/chrome/browser/payments/payment_request_edit_view_controller.h" |
| 9 |
| 10 // Internal API for subclasses of PaymentRequestEditViewController. |
| 11 @interface PaymentRequestEditViewController (Internal) |
| 12 |
| 13 // Validates each field. If there is a validation error, displays an error |
| 14 // message item in the same section as the field and returns NO. Otherwise |
| 15 // removes the error message item in that section if one exists and sets the |
| 16 // value on the field. Returns YES if all the fields are validated successfully. |
| 17 - (BOOL)validateForm; |
| 18 |
| 19 // Called after the editor field items have been added to the the collection |
| 20 // view model. Subclasses override this method to add items after the editor |
| 21 // fields. |
| 22 - (void)loadFooterItems; |
| 23 |
| 24 // Returns the index path for the cell associated with the currently focused |
| 25 // text field. |
| 26 - (NSIndexPath*)indexPathForCurrentTextField; |
| 27 |
| 28 // Adds an error message item in the section |sectionIdentifier| if |
| 29 // |errorMessage| is non-empty. Otherwise removes such an item if one exists. |
| 30 - (void)addOrRemoveErrorMessage:(NSString*)errorMessage |
| 31 inSectionWithIdentifier:(NSInteger)sectionIdentifier; |
| 32 |
| 33 @end |
| 34 |
| 35 #endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_EDIT_VIEW_CONTROLLER_INTE
RNAL_H_ |
| OLD | NEW |