Commit fbfb06dc authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

[iOS] Move AutofillEditCollectionVC to legacy

This is needed to move the subclasses to UITableView one by one.

Bug: 894791
Change-Id: I6790f649df2ca61cfd2551ac9afe6fff732a39dd
Reviewed-on: https://chromium-review.googlesource.com/c/1344057
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: default avataredchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609953}
parent 3d1221b6
......@@ -15,9 +15,6 @@ source_set("settings") {
"autofill_credit_card_collection_view_controller.mm",
"autofill_credit_card_edit_collection_view_controller.h",
"autofill_credit_card_edit_collection_view_controller.mm",
"autofill_edit_collection_view_controller+protected.h",
"autofill_edit_collection_view_controller.h",
"autofill_edit_collection_view_controller.mm",
"autofill_profile_collection_view_controller.h",
"autofill_profile_collection_view_controller.mm",
"autofill_profile_edit_collection_view_controller.h",
......@@ -60,6 +57,9 @@ source_set("settings") {
"handoff_table_view_controller.mm",
"import_data_collection_view_controller.h",
"import_data_collection_view_controller.mm",
"legacy_autofill_edit_collection_view_controller+protected.h",
"legacy_autofill_edit_collection_view_controller.h",
"legacy_autofill_edit_collection_view_controller.mm",
"material_cell_catalog_view_controller.h",
"material_cell_catalog_view_controller.mm",
"password_details_collection_view_controller.h",
......
......@@ -5,7 +5,7 @@
#ifndef IOS_CHROME_BROWSER_UI_SETTINGS_AUTOFILL_CREDIT_CARD_EDIT_COLLECTION_VIEW_CONTROLLER_H_
#define IOS_CHROME_BROWSER_UI_SETTINGS_AUTOFILL_CREDIT_CARD_EDIT_COLLECTION_VIEW_CONTROLLER_H_
#import "ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller.h"
#import "ios/chrome/browser/ui/settings/legacy_autofill_edit_collection_view_controller.h"
namespace autofill {
class CreditCard;
......@@ -14,7 +14,7 @@ class PersonalDataManager;
// The collection view for the credit card editor.
@interface AutofillCreditCardEditCollectionViewController
: AutofillEditCollectionViewController
: LegacyAutofillEditCollectionViewController
// Initializes a AutofillCreditCardEditCollectionViewController with
// |creditCard| and |dataManager|. These cannot be null.
......
......@@ -23,8 +23,8 @@
#import "ios/chrome/browser/ui/collection_view/collection_view_model.h"
#import "ios/chrome/browser/ui/commands/application_commands.h"
#import "ios/chrome/browser/ui/commands/open_new_tab_command.h"
#import "ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller+protected.h"
#import "ios/chrome/browser/ui/settings/cells/copied_to_chrome_item.h"
#import "ios/chrome/browser/ui/settings/legacy_autofill_edit_collection_view_controller+protected.h"
#import "ios/chrome/browser/ui/util/uikit_ui_util.h"
#include "ios/chrome/grit/ios_chromium_strings.h"
#include "ios/chrome/grit/ios_strings.h"
......
......@@ -5,7 +5,7 @@
#ifndef IOS_CHROME_BROWSER_UI_SETTINGS_AUTOFILL_PROFILE_EDIT_COLLECTION_VIEW_CONTROLLER_H_
#define IOS_CHROME_BROWSER_UI_SETTINGS_AUTOFILL_PROFILE_EDIT_COLLECTION_VIEW_CONTROLLER_H_
#import "ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller.h"
#import "ios/chrome/browser/ui/settings/legacy_autofill_edit_collection_view_controller.h"
namespace autofill {
class AutofillProfile;
......@@ -16,7 +16,7 @@ extern NSString* const kAutofillProfileEditCollectionViewId;
// The collection view for the Autofill settings.
@interface AutofillProfileEditCollectionViewController
: AutofillEditCollectionViewController
: LegacyAutofillEditCollectionViewController
// Creates a controller for |profile| and |dataManager| that cannot be null.
+ (instancetype)controllerWithProfile:(const autofill::AutofillProfile&)profile
......
......@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_SETTINGS_AUTOFILL_EDIT_COLLECTION_VIEW_CONTROLLER_PROTECTED_H_
#define IOS_CHROME_BROWSER_UI_SETTINGS_AUTOFILL_EDIT_COLLECTION_VIEW_CONTROLLER_PROTECTED_H_
#ifndef IOS_CHROME_BROWSER_UI_SETTINGS_LEGACY_AUTOFILL_EDIT_COLLECTION_VIEW_CONTROLLER_PROTECTED_H_
#define IOS_CHROME_BROWSER_UI_SETTINGS_LEGACY_AUTOFILL_EDIT_COLLECTION_VIEW_CONTROLLER_PROTECTED_H_
#import "ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller.h"
#import "ios/chrome/browser/ui/settings/legacy_autofill_edit_collection_view_controller.h"
// The collection view for an Autofill edit entry menu.
@interface AutofillEditCollectionViewController (Protected)
@interface LegacyAutofillEditCollectionViewController (Protected)
// Returns the indexPath for the currently focused text field when in edit mode.
- (NSIndexPath*)indexPathForCurrentTextField;
@end
#endif // IOS_CHROME_BROWSER_UI_SETTINGS_AUTOFILL_EDIT_COLLECTION_VIEW_CONTROLLER_PROTECTED_H_
#endif // IOS_CHROME_BROWSER_UI_SETTINGS_LEGACY_AUTOFILL_EDIT_COLLECTION_VIEW_CONTROLLER_PROTECTED_H_
......@@ -2,14 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_UI_SETTINGS_AUTOFILL_EDIT_COLLECTION_VIEW_CONTROLLER_H_
#define IOS_CHROME_BROWSER_UI_SETTINGS_AUTOFILL_EDIT_COLLECTION_VIEW_CONTROLLER_H_
#ifndef IOS_CHROME_BROWSER_UI_SETTINGS_LEGACY_AUTOFILL_EDIT_COLLECTION_VIEW_CONTROLLER_H_
#define IOS_CHROME_BROWSER_UI_SETTINGS_LEGACY_AUTOFILL_EDIT_COLLECTION_VIEW_CONTROLLER_H_
#import "ios/chrome/browser/ui/settings/settings_root_collection_view_controller.h"
// The collection view for an Autofill edit entry menu.
@interface AutofillEditCollectionViewController
// TODO(crbug.com/894800): Remove this.
@interface LegacyAutofillEditCollectionViewController
: SettingsRootCollectionViewController<UITextFieldDelegate>
@end
#endif // IOS_CHROME_BROWSER_UI_SETTINGS_AUTOFILL_EDIT_COLLECTION_VIEW_CONTROLLER_H_
#endif // IOS_CHROME_BROWSER_UI_SETTINGS_LEGACY_AUTOFILL_EDIT_COLLECTION_VIEW_CONTROLLER_H_
......@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller.h"
#import "ios/chrome/browser/ui/settings/legacy_autofill_edit_collection_view_controller.h"
#include "base/logging.h"
#import "base/mac/foundation_util.h"
#import "ios/chrome/browser/ui/autofill/autofill_edit_accessory_view.h"
#import "ios/chrome/browser/ui/autofill/cells/legacy_autofill_edit_item.h"
#import "ios/chrome/browser/ui/settings/autofill_edit_collection_view_controller+protected.h"
#import "ios/chrome/browser/ui/settings/legacy_autofill_edit_collection_view_controller+protected.h"
#import "ios/third_party/material_components_ios/src/components/CollectionCells/src/MaterialCollectionCells.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
......@@ -35,14 +35,14 @@ LegacyAutofillEditCell* AutofillEditCellForTextField(UITextField* textField) {
} // namespace
@interface AutofillEditCollectionViewController ()<
@interface LegacyAutofillEditCollectionViewController ()<
AutofillEditAccessoryDelegate> {
LegacyAutofillEditCell* _currentEditingCell;
AutofillEditAccessoryView* _accessoryView;
}
@end
@implementation AutofillEditCollectionViewController
@implementation LegacyAutofillEditCollectionViewController
- (instancetype)initWithLayout:(UICollectionViewLayout*)layout
style:(CollectionViewControllerStyle)style {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment