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

Unified Diff: ios/chrome/browser/payments/payment_items_display_coordinator.h

Issue 2585233003: Upstream Chrome on iOS source code [2/11]. (Closed)
Patch Set: Created 4 years 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/payments/payment_items_display_coordinator.h
diff --git a/ios/chrome/browser/payments/payment_items_display_coordinator.h b/ios/chrome/browser/payments/payment_items_display_coordinator.h
new file mode 100644
index 0000000000000000000000000000000000000000..9cfd0ee8901de3d6c22a50be657abcb7edf2c9f7
--- /dev/null
+++ b/ios/chrome/browser/payments/payment_items_display_coordinator.h
@@ -0,0 +1,51 @@
+// Copyright 2016 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_PAYMENTS_PAYMENT_ITEMS_DISPLAY_COORDINATOR_H_
+#define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_ITEMS_DISPLAY_COORDINATOR_H_
+
+#import <UIKit/UIKit.h>
+#include <vector>
+
+#import "ios/chrome/browser/chrome_coordinator.h"
+#import "ios/chrome/browser/payments/payment_items_display_view_controller.h"
+
+@class PaymentItemsDisplayCoordinator;
+
+// Protocol for communicating with the delegate supplied to
+// PaymentItemsDisplayCoordinator.
+@protocol PaymentItemsDisplayCoordinatorDelegate<NSObject>
+
+// Notifies the delegate that the user has chosen to return to the previous
+// screen.
+- (void)paymentItemsDisplayCoordinatorDidReturn:
+ (PaymentItemsDisplayCoordinator*)coordinator;
+
+// Notifies the delegate that the user has confirmed the payment.
+- (void)paymentItemsDisplayCoordinatorDidConfirm:
+ (PaymentItemsDisplayCoordinator*)coordinator;
+
+@end
+
+// Coordinator responsible for creating and presenting the payment items display
+// view controller. This view controller will be presented by the view
+// controller provided in the initializer.
+@interface PaymentItemsDisplayCoordinator : ChromeCoordinator
+
+// The payment total to be displayed to the user.
+@property(nonatomic, assign) web::PaymentItem total;
+
+// The line items to be displayed to the user.
+@property(nonatomic, assign) std::vector<web::PaymentItem> paymentItems;
+
+// Whether the pay button should be enabled.
+@property(nonatomic, assign) BOOL payButtonEnabled;
+
+// The delegate to be notified when the user selects touches the return button
+// or the pay button.
+@property(nonatomic, weak) id<PaymentItemsDisplayCoordinatorDelegate> delegate;
+
+@end
+
+#endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_ITEMS_DISPLAY_COORDINATOR_H_

Powered by Google App Engine
This is Rietveld 408576698