OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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_UI_PAYMENTS_COUNTRY_SELECTION_COORDINATOR_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_COUNTRY_SELECTION_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/ui/payments/payment_request_picker_view_controller.h
" |
| 13 |
| 14 @class CountrySelectionCoordinator; |
| 15 |
| 16 // Delegate protocol for CountrySelectionCoordinator. |
| 17 @protocol CountrySelectionCoordinatorDelegate<NSObject> |
| 18 |
| 19 // Notifies the delegate that the user has selected a country. |
| 20 - (void)countrySelectionCoordinator:(CountrySelectionCoordinator*)coordinator |
| 21 didSelectCountryWithCode:(NSString*)countryCode; |
| 22 |
| 23 @end |
| 24 |
| 25 // Coordinator responsible for creating and presenting the country selection |
| 26 // view controller. This view controller will be presented by the view |
| 27 // controller provided in the initializer. |
| 28 @interface CountrySelectionCoordinator |
| 29 : ChromeCoordinator<PaymentRequestPickerViewControllerDelegate> |
| 30 |
| 31 // A map of country codes to country names. |
| 32 @property(nonatomic, strong) NSDictionary<NSString*, NSString*>* countries; |
| 33 |
| 34 // The country code for the currently selected country, if any. |
| 35 @property(nonatomic, strong) NSString* selectedCountryCode; |
| 36 |
| 37 // The delegate to be notified when the user selects a country or returns |
| 38 // without selecting one. |
| 39 @property(nonatomic, weak) id<CountrySelectionCoordinatorDelegate> delegate; |
| 40 |
| 41 @end |
| 42 |
| 43 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_COUNTRY_SELECTION_COORDINATOR_H_ |
OLD | NEW |