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

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

Issue 2827453004: [Payment Request] Refactors selector view controllers (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 2016 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_SHIPPING_ADDRESS_SELECTION_VIEW_CONTROLLER_H _
6 #define IOS_CHROME_BROWSER_PAYMENTS_SHIPPING_ADDRESS_SELECTION_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 PaymentRequest;
13
14 namespace autofill {
15 class AutofillProfile;
16 } // namespace autofill
17
18 @class ShippingAddressSelectionViewController;
19
20 // Delegate protocol for ShippingAddressSelectionViewController.
21 @protocol ShippingAddressSelectionViewControllerDelegate<NSObject>
22
23 // Notifies the delegate that the user has selected a shipping address.
24 - (void)shippingAddressSelectionViewController:
25 (ShippingAddressSelectionViewController*)controller
26 didSelectShippingAddress:
27 (autofill::AutofillProfile*)shippingAddress;
28
29 // Notifies the delegate that the user has chosen to return to the previous
30 // screen without making a selection.
31 - (void)shippingAddressSelectionViewControllerDidReturn:
32 (ShippingAddressSelectionViewController*)controller;
33
34 @end
35
36 // View controller responsible for presenting the available shipping addresses
37 // for selection by the user and communicating their choice to the supplied
38 // delegate. Also offers a button to add a shipping address.
39 @interface ShippingAddressSelectionViewController : CollectionViewController
40
41 // Whether or not the view is in a pending state.
42 @property(nonatomic, assign, getter=isPending) BOOL pending;
43
44 // The error message to display, if any.
45 @property(nonatomic, copy) NSString* errorMessage;
46
47 // The delegate to be notified when the user selects a shipping address or
48 // returns without selecting one.
49 @property(nonatomic, weak)
50 id<ShippingAddressSelectionViewControllerDelegate> delegate;
51
52 // Initializes this object with an instance of PaymentRequest which has a copy
53 // of web::PaymentRequest as provided by the page invoking the Payment Request
54 // API. This object will not take ownership of |paymentRequest|.
55 - (instancetype)initWithPaymentRequest:(PaymentRequest*)paymentRequest
56 NS_DESIGNATED_INITIALIZER;
57
58 - (instancetype)init NS_UNAVAILABLE;
59
60 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style
61 NS_UNAVAILABLE;
62
63 @end
64
65 #endif // IOS_CHROME_BROWSER_PAYMENTS_SHIPPING_ADDRESS_SELECTION_VIEW_CONTROLLE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698