| 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_ADDRESS_EDIT_MEDIATOR_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_PAYMENTS_ADDRESS_EDIT_MEDIATOR_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_ADDRESS_EDIT_MEDIATOR_H_ | 6 #define IOS_CHROME_BROWSER_UI_PAYMENTS_ADDRESS_EDIT_MEDIATOR_H_ |
| 7 | 7 |
| 8 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller_dat
a_source.h" | 8 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller_dat
a_source.h" |
| 9 #import "ios/chrome/browser/ui/payments/region_data_loader.h" | 9 #import "ios/chrome/browser/ui/payments/region_data_loader.h" |
| 10 | 10 |
| 11 class PaymentRequest; | |
| 12 @protocol PaymentRequestEditConsumer; | 11 @protocol PaymentRequestEditConsumer; |
| 13 | 12 |
| 14 namespace autofill { | 13 namespace autofill { |
| 15 class AutofillProfile; | 14 class AutofillProfile; |
| 16 } // namespace autofill | 15 } // namespace autofill |
| 17 | 16 |
| 17 namespace payments { |
| 18 class PaymentRequest; |
| 19 } // namespace payments |
| 20 |
| 18 // Serves as data source for AddressEditViewController. | 21 // Serves as data source for AddressEditViewController. |
| 19 @interface AddressEditMediator | 22 @interface AddressEditMediator |
| 20 : NSObject<PaymentRequestEditViewControllerDataSource, | 23 : NSObject<PaymentRequestEditViewControllerDataSource, |
| 21 RegionDataLoaderConsumer> | 24 RegionDataLoaderConsumer> |
| 22 | 25 |
| 23 // The consumer for this object. This can change during the lifetime of this | 26 // The consumer for this object. This can change during the lifetime of this |
| 24 // object and may be nil. | 27 // object and may be nil. |
| 25 @property(nonatomic, weak) id<PaymentRequestEditConsumer> consumer; | 28 @property(nonatomic, weak) id<PaymentRequestEditConsumer> consumer; |
| 26 | 29 |
| 27 // The map of country codes to country names. | 30 // The map of country codes to country names. |
| 28 @property(nonatomic, strong) NSDictionary<NSString*, NSString*>* countries; | 31 @property(nonatomic, strong) NSDictionary<NSString*, NSString*>* countries; |
| 29 | 32 |
| 30 // The country code for the currently selected country, if any. | 33 // The country code for the currently selected country, if any. |
| 31 @property(nonatomic, strong) NSString* selectedCountryCode; | 34 @property(nonatomic, strong) NSString* selectedCountryCode; |
| 32 | 35 |
| 33 // Initializes this object with an instance of PaymentRequest which has a copy | 36 // Initializes this object with an instance of PaymentRequest which has a copy |
| 34 // of web::PaymentRequest as provided by the page invoking the Payment Request | 37 // of web::PaymentRequest as provided by the page invoking the Payment Request |
| 35 // API as well as |address| which is the address to be edited, if any. | 38 // API as well as |address| which is the address to be edited, if any. |
| 36 // This object will not take ownership of |paymentRequest| or |address|. | 39 // This object will not take ownership of |paymentRequest| or |address|. |
| 37 - (instancetype)initWithPaymentRequest:(PaymentRequest*)paymentRequest | 40 - (instancetype)initWithPaymentRequest:(payments::PaymentRequest*)paymentRequest |
| 38 address:(autofill::AutofillProfile*)address | 41 address:(autofill::AutofillProfile*)address |
| 39 NS_DESIGNATED_INITIALIZER; | 42 NS_DESIGNATED_INITIALIZER; |
| 40 | 43 |
| 41 - (instancetype)init NS_UNAVAILABLE; | 44 - (instancetype)init NS_UNAVAILABLE; |
| 42 | 45 |
| 43 @end | 46 @end |
| 44 | 47 |
| 45 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_ADDRESS_EDIT_MEDIATOR_H_ | 48 #endif // IOS_CHROME_BROWSER_UI_PAYMENTS_ADDRESS_EDIT_MEDIATOR_H_ |
| OLD | NEW |