OLD | NEW |
(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_SHIPPING_ADDRESS_SELECTION_MEDIATOR_H_ |
| 6 #define IOS_CHROME_BROWSER_PAYMENTS_SHIPPING_ADDRESS_SELECTION_MEDIATOR_H_ |
| 7 |
| 8 #import "ios/chrome/browser/payments/payment_request_selector_view_controller_da
ta_source.h" |
| 9 |
| 10 class PaymentRequest; |
| 11 |
| 12 // Serves as data source for PaymentRequestSelectorViewController. |
| 13 @interface ShippingAddressSelectionMediator |
| 14 : NSObject<PaymentRequestSelectorViewControllerDataSource> |
| 15 |
| 16 // The text to display in the header item. If nil, the header item will also be |
| 17 // nil. |
| 18 @property(nonatomic, copy) NSString* headerText; |
| 19 |
| 20 // The current state of the view controller. |
| 21 @property(nonatomic, readwrite, assign) PaymentRequestSelectorState state; |
| 22 |
| 23 // Index for the currently selected item or NSUIntegerMax if there is none. |
| 24 @property(nonatomic, readwrite, assign) NSUInteger selectedItemIndex; |
| 25 |
| 26 // Initializes this object with an instance of PaymentRequest which has a copy |
| 27 // of web::PaymentRequest as provided by the page invoking the Payment Request |
| 28 // API. This object will not take ownership of |paymentRequest|. |
| 29 - (instancetype)initWithPaymentRequest:(PaymentRequest*)paymentRequest |
| 30 NS_DESIGNATED_INITIALIZER; |
| 31 |
| 32 - (instancetype)init NS_UNAVAILABLE; |
| 33 |
| 34 @end |
| 35 |
| 36 #endif // IOS_CHROME_BROWSER_PAYMENTS_SHIPPING_ADDRESS_SELECTION_MEDIATOR_H_ |
OLD | NEW |