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

Unified Diff: ios/chrome/browser/ui/payments/country_selection_coordinator.h

Issue 2896623002: [Payment Request] Country selection coordinator (Closed)
Patch Set: Addressed comment Created 3 years, 7 months 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/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_
« no previous file with comments | « ios/chrome/browser/ui/payments/BUILD.gn ('k') | ios/chrome/browser/ui/payments/country_selection_coordinator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698