OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #import "ios/chrome/browser/payments/payment_method_selection_coordinator.h" | 5 #import "ios/chrome/browser/payments/payment_method_selection_coordinator.h" |
6 | 6 |
7 #include "components/autofill/core/browser/credit_card.h" | 7 #include "components/autofill/core/browser/credit_card.h" |
8 #include "ios/chrome/browser/payments/payment_request.h" | 8 #include "ios/chrome/browser/payments/payment_request.h" |
9 | 9 |
10 #if !defined(__has_feature) || !__has_feature(objc_arc) | 10 #if !defined(__has_feature) || !__has_feature(objc_arc) |
11 #error "This file requires ARC support." | 11 #error "This file requires ARC support." |
12 #endif | 12 #endif |
13 | 13 |
14 @interface PaymentMethodSelectionCoordinator () | 14 @interface PaymentMethodSelectionCoordinator () |
| 15 |
15 @property(nonatomic, strong) | 16 @property(nonatomic, strong) |
16 PaymentMethodSelectionViewController* viewController; | 17 PaymentMethodSelectionViewController* viewController; |
17 | 18 |
18 // Called when the user selects a payment method. The cell is checked, the | 19 // Called when the user selects a payment method. The cell is checked, the |
19 // UI is locked so that the user can't interact with it, then the delegate is | 20 // UI is locked so that the user can't interact with it, then the delegate is |
20 // notified. The delay is here to let the user get a visual feedback of the | 21 // notified. The delay is here to let the user get a visual feedback of the |
21 // selection before this view disappears. | 22 // selection before this view disappears. |
22 - (void)delayedNotifyDelegateOfSelection:(autofill::CreditCard*)paymentMethod; | 23 - (void)delayedNotifyDelegateOfSelection:(autofill::CreditCard*)paymentMethod; |
23 | 24 |
24 @end | 25 @end |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 return; | 73 return; |
73 | 74 |
74 strongSelf.viewController.view.userInteractionEnabled = YES; | 75 strongSelf.viewController.view.userInteractionEnabled = YES; |
75 [strongSelf.delegate | 76 [strongSelf.delegate |
76 paymentMethodSelectionCoordinator:strongSelf | 77 paymentMethodSelectionCoordinator:strongSelf |
77 didSelectPaymentMethod:paymentMethod]; | 78 didSelectPaymentMethod:paymentMethod]; |
78 }); | 79 }); |
79 } | 80 } |
80 | 81 |
81 @end | 82 @end |
OLD | NEW |