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

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

Issue 2932703004: [Payment Request] Contact Info editor (Closed)
Patch Set: Addressed comments Created 3 years, 6 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/contact_info_edit_coordinator.h
diff --git a/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.h b/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.h
new file mode 100644
index 0000000000000000000000000000000000000000..b9fb138276028ad149c791e4c7e257571dc66ee1
--- /dev/null
+++ b/ios/chrome/browser/ui/payments/contact_info_edit_coordinator.h
@@ -0,0 +1,58 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// 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_PAYMENTS_CONTACT_INFO_EDIT_COORDINATOR_H_
+#define IOS_CHROME_BROWSER_UI_PAYMENTS_CONTACT_INFO_EDIT_COORDINATOR_H_
+
+#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller.h"
+
+namespace autofill {
+class AutofillProfile;
+} // namespace autofill
+
+class PaymentRequest;
+
+@class ContactInfoEditCoordinator;
+
+// Delegate protocol for ContactInfoEditCoordinator.
+@protocol ContactInfoEditCoordinatorDelegate<NSObject>
+
+// Notifies the delegate that the user has finished editing or creating
+// |profile|. |profile| will be a new autofill profile instance owned by the
+// PaymentRequest object if none was provided to the coordinator. Otherwise, it
+// will be the same edited instance.
+- (void)contactInfoEditCoordinator:(ContactInfoEditCoordinator*)coordinator
+ didFinishEditingProfile:(autofill::AutofillProfile*)profile;
+
+// Notifies the delegate that the user has chosen to cancel editing or creating
+// a profile and return to the previous screen.
+- (void)contactInfoEditCoordinatorDidCancel:
+ (ContactInfoEditCoordinator*)coordinator;
+
+@end
+
+// Coordinator responsible for creating and presenting a profile editor view
+// controller. This view controller will be presented by the view controller
+// provided in the initializer.
+@interface ContactInfoEditCoordinator
+ : ChromeCoordinator<PaymentRequestEditViewControllerDelegate,
+ PaymentRequestEditViewControllerValidator>
+
+// The profile to be edited, if any. This pointer is not owned by this class
+// and should outlive it.
+@property(nonatomic, assign) autofill::AutofillProfile* profile;
+
+// The PaymentRequest object owning an instance of web::PaymentRequest as
+// provided by the page invoking the Payment Request API. This pointer is not
+// owned by this class and should outlive it.
+@property(nonatomic, assign) PaymentRequest* paymentRequest;
+
+// The delegate to be notified when the user returns or finishes creating or
+// editing a profile.
+@property(nonatomic, weak) id<ContactInfoEditCoordinatorDelegate> delegate;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_UI_PAYMENTS_CONTACT_INFO_EDIT_COORDINATOR_H_
« no previous file with comments | « ios/chrome/browser/ui/payments/BUILD.gn ('k') | ios/chrome/browser/ui/payments/contact_info_edit_coordinator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698