OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_ITEMS_DISPLAY_COORDINATOR_H_ |
| 6 #define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_ITEMS_DISPLAY_COORDINATOR_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 #include <vector> |
| 10 |
| 11 #import "ios/chrome/browser/chrome_coordinator.h" |
| 12 #import "ios/chrome/browser/payments/payment_items_display_view_controller.h" |
| 13 |
| 14 @class PaymentItemsDisplayCoordinator; |
| 15 |
| 16 // Protocol for communicating with the delegate supplied to |
| 17 // PaymentItemsDisplayCoordinator. |
| 18 @protocol PaymentItemsDisplayCoordinatorDelegate<NSObject> |
| 19 |
| 20 // Notifies the delegate that the user has chosen to return to the previous |
| 21 // screen. |
| 22 - (void)paymentItemsDisplayCoordinatorDidReturn: |
| 23 (PaymentItemsDisplayCoordinator*)coordinator; |
| 24 |
| 25 // Notifies the delegate that the user has confirmed the payment. |
| 26 - (void)paymentItemsDisplayCoordinatorDidConfirm: |
| 27 (PaymentItemsDisplayCoordinator*)coordinator; |
| 28 |
| 29 @end |
| 30 |
| 31 // Coordinator responsible for creating and presenting the payment items display |
| 32 // view controller. This view controller will be presented by the view |
| 33 // controller provided in the initializer. |
| 34 @interface PaymentItemsDisplayCoordinator : ChromeCoordinator |
| 35 |
| 36 // The payment total to be displayed to the user. |
| 37 @property(nonatomic, assign) web::PaymentItem total; |
| 38 |
| 39 // The line items to be displayed to the user. |
| 40 @property(nonatomic, assign) std::vector<web::PaymentItem> paymentItems; |
| 41 |
| 42 // Whether the pay button should be enabled. |
| 43 @property(nonatomic, assign) BOOL payButtonEnabled; |
| 44 |
| 45 // The delegate to be notified when the user selects touches the return button |
| 46 // or the pay button. |
| 47 @property(nonatomic, weak) id<PaymentItemsDisplayCoordinatorDelegate> delegate; |
| 48 |
| 49 @end |
| 50 |
| 51 #endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_ITEMS_DISPLAY_COORDINATOR_H_ |
OLD | NEW |