| OLD | NEW |
| 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_METHOD_SELECTION_MEDIATOR_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_METHOD_SELECTION_MEDIATOR_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_METHOD_SELECTION_MEDIATOR_H_ | 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_METHOD_SELECTION_MEDIATOR_H_ |
| 7 | 7 |
| 8 #import "ios/chrome/browser/ui/payments/payment_request_selector_view_controller
_data_source.h" | 8 #import "ios/chrome/browser/ui/payments/payment_request_selector_view_controller
_data_source.h" |
| 9 | 9 |
| 10 namespace payments { |
| 10 class PaymentRequest; | 11 class PaymentRequest; |
| 12 } // namespace payments |
| 11 | 13 |
| 12 // Serves as data source for PaymentRequestSelectorViewController. | 14 // Serves as data source for PaymentRequestSelectorViewController. |
| 13 @interface PaymentMethodSelectionMediator | 15 @interface PaymentMethodSelectionMediator |
| 14 : NSObject<PaymentRequestSelectorViewControllerDataSource> | 16 : NSObject<PaymentRequestSelectorViewControllerDataSource> |
| 15 | 17 |
| 16 // Redefined to be read-write. | 18 // Redefined to be read-write. |
| 17 @property(nonatomic, readwrite, assign) PaymentRequestSelectorState state; | 19 @property(nonatomic, readwrite, assign) PaymentRequestSelectorState state; |
| 18 | 20 |
| 19 // Redefined to be read-write. | 21 // Redefined to be read-write. |
| 20 @property(nonatomic, readwrite, assign) NSUInteger selectedItemIndex; | 22 @property(nonatomic, readwrite, assign) NSUInteger selectedItemIndex; |
| 21 | 23 |
| 22 // Creates and stores the selectable items to display in the collection. | 24 // Creates and stores the selectable items to display in the collection. |
| 23 - (void)loadItems; | 25 - (void)loadItems; |
| 24 | 26 |
| 25 // Initializes this object with an instance of PaymentRequest which has a copy | 27 // Initializes this object with an instance of PaymentRequest which has a copy |
| 26 // of web::PaymentRequest as provided by the page invoking the Payment Request | 28 // of web::PaymentRequest as provided by the page invoking the Payment Request |
| 27 // API. This object will not take ownership of |paymentRequest|. | 29 // API. This object will not take ownership of |paymentRequest|. |
| 28 - (instancetype)initWithPaymentRequest:(PaymentRequest*)paymentRequest | 30 - (instancetype)initWithPaymentRequest:(payments::PaymentRequest*)paymentRequest |
| 29 NS_DESIGNATED_INITIALIZER; | 31 NS_DESIGNATED_INITIALIZER; |
| 30 | 32 |
| 31 - (instancetype)init NS_UNAVAILABLE; | 33 - (instancetype)init NS_UNAVAILABLE; |
| 32 | 34 |
| 33 @end | 35 @end |
| 34 | 36 |
| 35 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_METHOD_SELECTION_MEDIATOR_H_ | 37 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_METHOD_SELECTION_MEDIATOR_H_ |
| OLD | NEW |