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

Unified Diff: ios/chrome/browser/payments/payment_request_picker_view_controller.h

Issue 2778343002: [Payment Request] Picker view + showcase integration + egtests (Closed)
Patch Set: Addressed comments Created 3 years, 8 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/payments/payment_request_picker_view_controller.h
diff --git a/ios/chrome/browser/payments/payment_request_picker_view_controller.h b/ios/chrome/browser/payments/payment_request_picker_view_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..25068d25b40cfc86c6676eae4ea640cdd3822b1e
--- /dev/null
+++ b/ios/chrome/browser/payments/payment_request_picker_view_controller.h
@@ -0,0 +1,45 @@
+// 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_PAYMENT_REQUEST_PICKER_VIEW_CONTROLLER_H_
+#define IOS_CHROME_BROWSER_PAYMENT_REQUEST_PICKER_VIEW_CONTROLLER_H_
+
+#import <UIKit/UIKit.h>
+
+extern NSString* const kPaymentRequestPickerRowAccessibilityID;
+extern NSString* const kPaymentRequestPickerSearchBarAccessibilityID;
+
+@class PaymentRequestPickerViewController;
+@class PickerRow;
+
+// Delegate protocol for PaymentRequestPickerViewController.
+@protocol PaymentRequestPickerViewControllerDelegate<NSObject>
+
+// Notifies the delegate that the user has selected a row.
+- (void)paymentRequestPickerViewController:
+ (PaymentRequestPickerViewController*)controller
+ didSelectRow:(PickerRow*)row;
+
+@end
+
+// TableViewController that displays a searchable list of rows featuring a
+// selected row as well as an index list.
+@interface PaymentRequestPickerViewController : UITableViewController
+
+// The delegate to be notified when the user selects a row.
+@property(nonatomic, weak) id<PaymentRequestPickerViewControllerDelegate>
+ delegate;
+
+// Initializes the tableView with a list of rows and an optional selected row.
+- (instancetype)initWithRows:(NSArray<PickerRow*>*)rows
+ selected:(PickerRow*)row NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)init NS_UNAVAILABLE;
+- (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE;
+- (instancetype)initWithNibName:(NSString*)nibNameOrNil
+ bundle:(NSBundle*)nibBundleOrNil NS_UNAVAILABLE;
+- (instancetype)initWithStyle:(UITableViewStyle)style NS_UNAVAILABLE;
+@end
+
+#endif // IOS_CHROME_BROWSER_PAYMENT_REQUEST_PICKER_VIEW_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698