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

Unified Diff: ios/chrome/browser/ui/payments/payment_request_edit_view_controller_data_source.h

Issue 2876603005: [Payment Request] Refactors the edit view controller (Closed)
Patch Set: Addressed comments Created 3 years, 7 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/payments/payment_request_edit_view_controller_data_source.h
diff --git a/ios/chrome/browser/ui/payments/payment_request_edit_view_controller_data_source.h b/ios/chrome/browser/ui/payments/payment_request_edit_view_controller_data_source.h
index 009128b0294db3ef34e3d60458b362d4f4ca88c9..e56f1e22e518adf9e8541cd839253bfec18f8083 100644
--- a/ios/chrome/browser/ui/payments/payment_request_edit_view_controller_data_source.h
+++ b/ios/chrome/browser/ui/payments/payment_request_edit_view_controller_data_source.h
@@ -8,10 +8,28 @@
#import <Foundation/Foundation.h>
@class EditorField;
+@class CollectionViewItem;
+
+// The possible states the view controller can be in.
+typedef NS_ENUM(NSInteger, EditViewControllerState) {
+ // The view controller is used for creating.
+ EditViewControllerStateCreate,
+ // The view controller is used to editing.
+ EditViewControllerStateEdit,
+};
// Data source protocol for PaymentRequestEditViewController.
@protocol PaymentRequestEditViewControllerDataSource<NSObject>
+// The current state of the view controller.
+@property(nonatomic, assign) EditViewControllerState state;
+
+// Returns the header item. May be nil.
+- (CollectionViewItem*)headerItem;
+
+// Returns whether the header item should hide its background.
+- (BOOL)shouldHideBackgroundForHeaderItem;
+
// Returns the list of field definitions for the editor.
- (NSArray<EditorField*>*)editorFields;

Powered by Google App Engine
This is Rietveld 408576698