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