Index: ios/chrome/browser/ui/payments/country_selection_coordinator.h |
diff --git a/ios/chrome/browser/ui/payments/country_selection_coordinator.h b/ios/chrome/browser/ui/payments/country_selection_coordinator.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9984928be81035a17851ec3a2b9e7d10eb8d2246 |
--- /dev/null |
+++ b/ios/chrome/browser/ui/payments/country_selection_coordinator.h |
@@ -0,0 +1,43 @@ |
+// 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_COUNTRY_SELECTION_COORDINATOR_H_ |
+#define IOS_CHROME_BROWSER_UI_PAYMENTS_COUNTRY_SELECTION_COORDINATOR_H_ |
+ |
+#import <UIKit/UIKit.h> |
+#include <vector> |
+ |
+#import "ios/chrome/browser/chrome_coordinator.h" |
+#import "ios/chrome/browser/ui/payments/payment_request_picker_view_controller.h" |
+ |
+@class CountrySelectionCoordinator; |
+ |
+// Delegate protocol for CountrySelectionCoordinator. |
+@protocol CountrySelectionCoordinatorDelegate<NSObject> |
+ |
+// Notifies the delegate that the user has selected a country. |
+- (void)countrySelectionCoordinator:(CountrySelectionCoordinator*)coordinator |
+ didSelectCountryWithCode:(NSString*)countryCode; |
+ |
+@end |
+ |
+// Coordinator responsible for creating and presenting the country selection |
+// view controller. This view controller will be presented by the view |
+// controller provided in the initializer. |
+@interface CountrySelectionCoordinator |
+ : ChromeCoordinator<PaymentRequestPickerViewControllerDelegate> |
+ |
+// A map of country codes to country names. |
+@property(nonatomic, strong) NSDictionary<NSString*, NSString*>* countries; |
+ |
+// The country code for the currently selected country, if any. |
+@property(nonatomic, strong) NSString* selectedCountryCode; |
+ |
+// The delegate to be notified when the user selects a country or returns |
+// without selecting one. |
+@property(nonatomic, weak) id<CountrySelectionCoordinatorDelegate> delegate; |
+ |
+@end |
+ |
+#endif // IOS_CHROME_BROWSER_UI_PAYMENTS_COUNTRY_SELECTION_COORDINATOR_H_ |