OLD | NEW |
(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 #include "ios/web/public/payments/payment_request.h" |
| 12 |
| 13 namespace autofill { |
| 14 class AutofillProfile; |
| 15 } // namespace autofill |
| 16 |
| 17 @class ShippingAddressSelectionViewController; |
| 18 |
| 19 @protocol ShippingAddressSelectionViewControllerDelegate<NSObject> |
| 20 |
| 21 - (void)shippingAddressSelectionViewController: |
| 22 (ShippingAddressSelectionViewController*)controller |
| 23 selectedShippingAddress: |
| 24 (autofill::AutofillProfile*)shippingAddress; |
| 25 - (void)shippingAddressSelectionViewControllerDidReturn: |
| 26 (ShippingAddressSelectionViewController*)controller; |
| 27 |
| 28 @end |
| 29 |
| 30 // View controller responsible for presenting the available shipping addresses |
| 31 // for selection by the user and communicating their choice to the supplied |
| 32 // delegate. Also offers a button to add a shipping address. |
| 33 @interface ShippingAddressSelectionViewController : CollectionViewController |
| 34 |
| 35 // The available shipping addresses to fulfill the payment request. |
| 36 @property(nonatomic, assign) std::vector<autofill::AutofillProfile*> |
| 37 shippingAddresses; |
| 38 |
| 39 // The shipping address selected by the user, if any. |
| 40 @property(nonatomic, assign) autofill::AutofillProfile* selectedShippingAddress; |
| 41 |
| 42 // The delegate to be notified when the user selects a shipping address or |
| 43 // returns without selecting one. |
| 44 @property(nonatomic, weak) id<ShippingAddressSelectionViewControllerDelegate> |
| 45 delegate; |
| 46 |
| 47 - (instancetype)init NS_DESIGNATED_INITIALIZER; |
| 48 |
| 49 - (instancetype)initWithStyle:(CollectionViewControllerStyle)style |
| 50 NS_UNAVAILABLE; |
| 51 |
| 52 @end |
| 53 |
| 54 #endif // IOS_CHROME_BROWSER_PAYMENTS_SHIPPING_ADDRESS_SELECTION_VIEW_CONTROLLE
R_H_ |
OLD | NEW |