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

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

Issue 2866793002: [Payment Request] Refactors PaymentRequestCoordinator. (Closed)
Patch Set: Rebase. 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_view_controller.h
diff --git a/ios/chrome/browser/ui/payments/payment_request_view_controller.h b/ios/chrome/browser/ui/payments/payment_request_view_controller.h
index 805989417f8b894de68bb13759fc672c2b8dbe8f..dcfad982fee6238c5a11710c19dbbfb6548244c0 100644
--- a/ios/chrome/browser/ui/payments/payment_request_view_controller.h
+++ b/ios/chrome/browser/ui/payments/payment_request_view_controller.h
@@ -17,6 +17,15 @@ class PaymentRequest;
@class PaymentRequestViewController;
+// Data source protocol for PaymentRequestViewController.
+@protocol PaymentRequestViewControllerDataSource<NSObject>
+
+// Returns the authenticated account name, if a user is authenticated.
+// Otherwise, returns nil.
+- (NSString*)authenticatedAccountName;
Moe 2017/05/08 21:24:12 Optional: You could have the data source simply re
marq (ping after 24h) 2017/05/09 09:00:33 +1, good suggestion. This can be in a follow-up CL
macourteau 2017/05/09 15:21:53 Ack, will do in a follow-up CL.
+
+@end
+
// Delegate protocol for PaymentRequestViewController.
@protocol PaymentRequestViewControllerDelegate<NSObject>
@@ -73,10 +82,10 @@ class PaymentRequest;
// Whether the data source should be shown (usually until the first payment
// has been completed) or not.
-@property(nonatomic, assign) BOOL showDataSource;
+@property(nonatomic, assign) BOOL showPaymentDataSource;
-// If the user is signed in, the name of the authenticated account.
-@property(nonatomic, copy) NSString* authenticatedAccountName;
+@property(nonatomic, weak) id<PaymentRequestViewControllerDataSource>
+ dataSource;
// Updates the payment summary section UI. If |totalValueChanged| is YES,
// adds a label to the total amount item indicating that the total amount was

Powered by Google App Engine
This is Rietveld 408576698