| 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_REQUEST_MEDIATOR_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_MEDIATOR_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_MEDIATOR_H_ | 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_MEDIATOR_H_ |
| 7 | 7 |
| 8 #import "ios/chrome/browser/ui/payments/payment_request_view_controller_data_sou
rce.h" | 8 #import "ios/chrome/browser/ui/payments/payment_request_view_controller_data_sou
rce.h" |
| 9 | 9 |
| 10 namespace ios { | |
| 11 class ChromeBrowserState; | |
| 12 } // namespace ios | |
| 13 | |
| 14 class PaymentRequest; | 10 class PaymentRequest; |
| 15 | 11 |
| 16 // A mediator object that provides data for a PaymentRequestViewController. | 12 // A mediator object that provides data for a PaymentRequestViewController. |
| 17 @interface PaymentRequestMediator | 13 @interface PaymentRequestMediator |
| 18 : NSObject<PaymentRequestViewControllerDataSource> | 14 : NSObject<PaymentRequestViewControllerDataSource> |
| 19 | 15 |
| 20 // Whether or not the total price value was changed by the merchant. | 16 // Whether or not the total price value was changed by the merchant. |
| 21 @property(nonatomic, assign) BOOL totalValueChanged; | 17 @property(nonatomic, assign) BOOL totalValueChanged; |
| 22 | 18 |
| 23 // Initializes this object with an instance of ios::ChromeBrowserState and an | 19 // Initializes this object with an instance of PaymentRequest which has a copy |
| 24 // instance of PaymentRequest which has a copy of web::PaymentRequest as | 20 // of web::PaymentRequest as provided by the page invoking the Payment Request |
| 25 // provided by the page invoking the Payment Request API. This object will not | 21 // API. This object will not take ownership of |paymentRequest|. |
| 26 // take ownership of |browserState| or |paymentRequest|. | 22 - (instancetype)initWithPaymentRequest:(PaymentRequest*)paymentRequest |
| 27 - (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState | |
| 28 paymentRequest:(PaymentRequest*)paymentRequest | |
| 29 NS_DESIGNATED_INITIALIZER; | 23 NS_DESIGNATED_INITIALIZER; |
| 30 | 24 |
| 31 - (instancetype)init NS_UNAVAILABLE; | 25 - (instancetype)init NS_UNAVAILABLE; |
| 32 | 26 |
| 33 @end | 27 @end |
| 34 | 28 |
| 35 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_MEDIATOR_H | 29 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_PAYMENT_REQUEST_MEDIATOR_H |
| OLD | NEW |