Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller.mm

Issue 2731293002: [Payment Request] Updates AutofillEditItem to reuse in Payment Request (Closed)
Patch Set: Addressed comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller.mm
diff --git a/ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller.mm b/ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller.mm
index f0f4faaaa6d36d7a2032a57e9f7b4f3891b451dd..bc485697d63b01e2f0a8f35ab6e0ce3a5a7c4171 100644
--- a/ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller.mm
+++ b/ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller.mm
@@ -8,6 +8,7 @@
#import "base/mac/foundation_util.h"
#import "base/mac/scoped_nsobject.h"
#import "ios/chrome/browser/ui/settings/autofill_edit_accessory_view.h"
+#import "ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller+protected.h"
#import "ios/chrome/browser/ui/settings/cells/autofill_edit_item.h"
#import "ios/third_party/material_components_ios/src/components/CollectionCells/src/MaterialCollectionCells.h"
@@ -128,6 +129,20 @@ AutofillEditCell* AutofillEditCellForTextField(UITextField* textField) {
#pragma mark - AutofillEditAccessoryDelegate
+- (void)nextPressed {
+ [self moveToAnotherCellWithOffset:1];
+}
+
+- (void)previousPressed {
+ [self moveToAnotherCellWithOffset:-1];
+}
+
+- (void)closePressed {
+ [[_currentEditingCell textField] resignFirstResponder];
+}
+
+#pragma mark - Helper methods
+
- (NSIndexPath*)indexPathForCurrentTextField {
DCHECK(_currentEditingCell);
return [[self collectionView] indexPathForCell:_currentEditingCell];
@@ -149,18 +164,6 @@ AutofillEditCell* AutofillEditCellForTextField(UITextField* textField) {
}
}
-- (void)nextPressed {
- [self moveToAnotherCellWithOffset:1];
-}
-
-- (void)previousPressed {
- [self moveToAnotherCellWithOffset:-1];
-}
-
-- (void)closePressed {
- [[_currentEditingCell textField] resignFirstResponder];
-}
-
- (void)updateAccessoryViewButtonState {
NSIndexPath* currentPath = [self indexPathForCurrentTextField];
NSIndexPath* nextPath =

Powered by Google App Engine
This is Rietveld 408576698