Index: ios/chrome/browser/payments/shipping_option_selection_coordinator.h |
diff --git a/ios/chrome/browser/payments/shipping_option_selection_coordinator.h b/ios/chrome/browser/payments/shipping_option_selection_coordinator.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..07fb2d89202106c016b6a905213c4e78e890aa3b |
--- /dev/null |
+++ b/ios/chrome/browser/payments/shipping_option_selection_coordinator.h |
@@ -0,0 +1,46 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
lpromero
2017/01/11 12:51:15
2017. You can use boilerplate.py to create the boi
Moe
2017/01/12 00:06:18
Today I learned.
|
+// 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_SHIPPING_OPTION_SELECTION_COORDINATOR_H_ |
+#define IOS_CHROME_BROWSER_PAYMENTS_SHIPPING_OPTION_SELECTION_COORDINATOR_H_ |
+ |
+#import <UIKit/UIKit.h> |
+#include <vector> |
+ |
+#import "ios/chrome/browser/chrome_coordinator.h" |
+#include "ios/web/public/payments/payment_request.h" |
+ |
+@class ShippingOptionSelectionCoordinator; |
+ |
+@protocol ShippingOptionSelectionCoordinatorDelegate<NSObject> |
+ |
+- (void)shippingOptionSelectionCoordinator: |
lpromero
2017/01/11 12:51:15
Comments for these two methods.
Moe
2017/01/12 00:06:18
Done.
|
+ (ShippingOptionSelectionCoordinator*)coordinator |
+ selectedShippingOption: |
+ (web::PaymentShippingOption*)shippingOption; |
+- (void)shippingOptionSelectionCoordinatorDidReturn: |
+ (ShippingOptionSelectionCoordinator*)coordinator; |
+ |
+@end |
+ |
+// Coordinator responsible for creating and presenting the shipping option |
+// selection view controller. This view controller will be presented by the view |
+// controller provided in the initializer. |
+@interface ShippingOptionSelectionCoordinator : ChromeCoordinator |
+ |
+// The available shipping options to fulfill the payment request. |
+@property(nonatomic, assign) std::vector<web::PaymentShippingOption*> |
+ shippingOptions; |
+ |
+// The shipping option selected by the user, if any. |
+@property(nonatomic, assign) web::PaymentShippingOption* selectedShippingOption; |
+ |
+// The delegate to be notified when the user selects a shipping option or |
+// returns without selecting one. |
+@property(nonatomic, weak) id<ShippingOptionSelectionCoordinatorDelegate> |
+ delegate; |
+ |
+@end |
+ |
+#endif // IOS_CHROME_BROWSER_PAYMENTS_SHIPPING_OPTION_SELECTION_COORDINATOR_H_ |