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

Side by Side Diff: ios/chrome/browser/payments/payment_request_selector_view_controller.h

Issue 2826713002: [Payment Request] Refactors the remaining selector view controllers (Closed)
Patch Set: Addressed comment 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLLER_H_ 5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLLER_H_ 6 #define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLLER_H_
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h" 10 #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h"
11 11
12 @class PaymentRequestSelectorViewController; 12 @class PaymentRequestSelectorViewController;
13 @protocol PaymentRequestSelectorViewControllerDataSource; 13 @protocol PaymentRequestSelectorViewControllerDataSource;
14 14
15 // Delegate protocol for PaymentRequestSelectorViewController. 15 // Delegate protocol for PaymentRequestSelectorViewController.
16 @protocol PaymentRequestSelectorViewControllerDelegate<NSObject> 16 @protocol PaymentRequestSelectorViewControllerDelegate<NSObject>
17 17
18 // Notifies the delegate that the user has selected an item at the given index. 18 // Notifies the delegate that the user has selected an item at the given index.
19 - (void)paymentRequestSelectorViewController: 19 - (void)paymentRequestSelectorViewController:
20 (PaymentRequestSelectorViewController*)controller 20 (PaymentRequestSelectorViewController*)controller
21 didSelectItemAtIndex:(NSUInteger)index; 21 didSelectItemAtIndex:(NSUInteger)index;
22 22
23 // Notifies the delegate that the user has chosen to add an item.
24 - (void)paymentRequestSelectorViewControllerDidSelectAddItem:
25 (PaymentRequestSelectorViewController*)controller;
26
27 // Notifies the delegate that the user has chosen to return to the previous 23 // Notifies the delegate that the user has chosen to return to the previous
28 // screen without making a selection. 24 // screen without making a selection.
29 - (void)paymentRequestSelectorViewControllerDidFinish: 25 - (void)paymentRequestSelectorViewControllerDidFinish:
30 (PaymentRequestSelectorViewController*)controller; 26 (PaymentRequestSelectorViewController*)controller;
31 27
28 @optional
29
30 // Notifies the delegate that the user has chosen to add an item.
31 - (void)paymentRequestSelectorViewControllerDidSelectAddItem:
32 (PaymentRequestSelectorViewController*)controller;
33
32 @end 34 @end
33 35
34 // View controller responsible for presenting a list of items provided by the 36 // View controller responsible for presenting a list of items provided by the
35 // supplied data source for selection by the user and communicating the choice 37 // supplied data source for selection by the user and communicating the choice
36 // to the supplied delegate. It displays an optional header item provided by the 38 // to the supplied delegate. It displays an optional header item provided by the
37 // data source above the list of selectable items. The list is followed by an 39 // data source above the list of selectable items. The list is followed by an
38 // optional button to add an item. 40 // optional button to add an item.
39 @interface PaymentRequestSelectorViewController : CollectionViewController 41 @interface PaymentRequestSelectorViewController : CollectionViewController
40 42
41 // The delegate to be notified when the user selects an item, returns without 43 // The delegate to be notified when the user selects an item, returns without
42 // selection, or decides to add an item. 44 // selection, or decides to add an item.
43 @property(nonatomic, weak) id<PaymentRequestSelectorViewControllerDelegate> 45 @property(nonatomic, weak) id<PaymentRequestSelectorViewControllerDelegate>
44 delegate; 46 delegate;
45 47
46 // The data source for this view controller. 48 // The data source for this view controller.
47 @property(nonatomic, weak) id<PaymentRequestSelectorViewControllerDataSource> 49 @property(nonatomic, weak) id<PaymentRequestSelectorViewControllerDataSource>
48 dataSource; 50 dataSource;
49 51
50 // Convenience initializer. Initializes this object with the 52 // Convenience initializer. Initializes this object with the
51 // CollectionViewControllerStyleAppBar style and sets up the leading (back) 53 // CollectionViewControllerStyleAppBar style and sets up the leading (back)
52 // button. 54 // button.
53 - (instancetype)init; 55 - (instancetype)init;
54 56
55 @end 57 @end
56 58
57 #endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLLER_ H_ 59 #endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLLER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698