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

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

Issue 2805273002: [Payment Request] Selector view controller (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 unified diff | Download patch
OLDNEW
(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_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLLER_H_
7
8 #import <UIKit/UIKit.h>
9
10 #import "ios/chrome/browser/ui/collection_view/collection_view_controller.h"
11
12 @class PaymentRequestSelectorViewController;
13 @protocol PaymentRequestSelectorViewControllerDataSource;
14
15 // Delegate protocol for PaymentRequestSelectorViewController.
16 @protocol PaymentRequestSelectorViewControllerDelegate<NSObject>
17
18 // Notifies the delegate that the user has selected an item at the given index.
19 - (void)paymentRequestSelectorViewController:
20 (PaymentRequestSelectorViewController*)controller
21 didSelectItemAtIndex:(NSUInteger)index;
22
23 // Notifies the delegate that the user has chosen to return to the previous
24 // screen without making a selection.
25 - (void)paymentRequestSelectorViewControllerDidReturn:
gambard 2017/04/18 08:06:37 Nit: this name might be more explicit (first time
lpromero 2017/04/18 08:43:45 Usually such delegate calls use "Did". I think you
Moe 2017/04/18 12:43:29 Done.
26 (PaymentRequestSelectorViewController*)controller;
27
28 // Notifies the delegate that the user has chosen to add an item.
29 - (void)paymentRequestSelectorViewControllerDidSelectAddItem:
gambard 2017/04/18 08:06:37 Nit: The methods name for the delegate are not eas
lpromero 2017/04/18 08:43:45 Maybe just moving it before the previous method wo
Moe 2017/04/18 12:43:29 Done.
30 (PaymentRequestSelectorViewController*)controller;
31
32 @end
33
34 // 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
36 // 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
38 // optional button to add an item.
39 @interface PaymentRequestSelectorViewController : CollectionViewController
40
41 // The delegate to be notified when the user selects an item, returns without
42 // selection, or decides to add an item.
43 @property(nonatomic, weak) id<PaymentRequestSelectorViewControllerDelegate>
44 delegate;
45
46 // The data source for this view controller.
47 @property(nonatomic, weak) id<PaymentRequestSelectorViewControllerDataSource>
48 dataSource;
49
50 // Convenience initializer. Initializes this object with the
51 // CollectionViewControllerStyleAppBar and sets up the leading (return) button.
lpromero 2017/04/18 08:43:45 with the CollectionViewControllerStyleAppBar *styl
lpromero 2017/04/18 08:43:45 s/return/back If you rename the protocol method t
Moe 2017/04/18 12:43:29 Done.
Moe 2017/04/18 12:43:29 Done.
52 - (instancetype)init;
53
54 @end
55
56 #endif // IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLLER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698