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

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

Issue 2938673003: [Payment Request] Selector view edit mode (Closed)
Patch Set: Created 3 years, 6 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_UI_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLLER_ H_ 5 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLLER_ H_
6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLLER_ H_ 6 #define IOS_CHROME_BROWSER_UI_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 #import "ios/chrome/browser/ui/payments/payment_request_selector_view_controller _data_source.h"
11 12
12 @class PaymentRequestSelectorViewController; 13 @class PaymentRequestSelectorViewController;
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 return to the previous 23 // Notifies the delegate that the user has chosen to return to the previous
24 // screen without making a selection. 24 // screen without making a selection.
25 - (void)paymentRequestSelectorViewControllerDidFinish: 25 - (void)paymentRequestSelectorViewControllerDidFinish:
26 (PaymentRequestSelectorViewController*)controller; 26 (PaymentRequestSelectorViewController*)controller;
27 27
28 @optional 28 @optional
29 29
30 // Notifies the delegate that the user has chosen to add an item. 30 // Notifies the delegate that the user has chosen to add an item.
31 - (void)paymentRequestSelectorViewControllerDidSelectAddItem: 31 - (void)paymentRequestSelectorViewControllerDidSelectAddItem:
32 (PaymentRequestSelectorViewController*)controller; 32 (PaymentRequestSelectorViewController*)controller;
33 33
34 // Notifies the delegate that the view controller's state has changed.
35 - (void)paymentRequestSelectorViewController:
36 (PaymentRequestSelectorViewController*)controller
37 didChangeToState:(PaymentRequestSelectorState)state;
lpromero 2017/06/14 09:10:12 The implementation doesn't seem to notify when cha
Moe 2017/06/14 14:35:05 Done. You certainly have a point. Using the Paymen
38
39 // Notifies the delegate that the user has chosen to edit an item at |index|.
40 - (void)paymentRequestSelectorViewController:
41 (PaymentRequestSelectorViewController*)controller
42 didSelectItemAtIndexForEditing:(NSUInteger)index;
43
34 @end 44 @end
35 45
36 // View controller responsible for presenting a list of items provided by the 46 // View controller responsible for presenting a list of items provided by the
37 // supplied data source for selection by the user and communicating the choice 47 // supplied data source for selection by the user and communicating the choice
38 // to the supplied delegate. It displays an optional header item provided by the 48 // to the supplied delegate. It displays an optional header item provided by the
39 // data source above the list of selectable items. The list is followed by an 49 // data source above the list of selectable items. The list is followed by an
40 // optional button to add an item. 50 // optional button to add an item.
41 @interface PaymentRequestSelectorViewController : CollectionViewController 51 @interface PaymentRequestSelectorViewController : CollectionViewController
42 52
43 // The delegate to be notified when the user selects an item, returns without 53 // The delegate to be notified when the user selects an item, returns without
44 // selection, or decides to add an item. 54 // selection, or decides to add an item.
45 @property(nonatomic, weak) id<PaymentRequestSelectorViewControllerDelegate> 55 @property(nonatomic, weak) id<PaymentRequestSelectorViewControllerDelegate>
46 delegate; 56 delegate;
47 57
48 // The data source for this view controller. 58 // The data source for this view controller.
49 @property(nonatomic, weak) id<PaymentRequestSelectorViewControllerDataSource> 59 @property(nonatomic, weak) id<PaymentRequestSelectorViewControllerDataSource>
50 dataSource; 60 dataSource;
51 61
52 // Convenience initializer. Initializes this object with the 62 // Convenience initializer. Initializes this object with the
53 // CollectionViewControllerStyleAppBar style and sets up the leading (back) 63 // CollectionViewControllerStyleAppBar style and sets up the leading (back)
54 // button. 64 // button.
55 - (instancetype)init; 65 - (instancetype)init;
56 66
57 @end 67 @end
58 68
59 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLL ER_H_ 69 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_SELECTOR_VIEW_CONTROLL ER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698