| 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/shipping_address_selection_coordinator.h" | 5 #import "ios/chrome/browser/payments/shipping_address_selection_coordinator.h" |
| 6 | 6 |
| 7 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
| 8 #include "components/autofill/core/browser/autofill_profile.h" | 8 #include "components/autofill/core/browser/autofill_profile.h" |
| 9 #include "components/payments/core/strings_util.h" | 9 #include "components/payments/core/strings_util.h" |
| 10 #include "ios/chrome/browser/payments/payment_request.h" | 10 #include "ios/chrome/browser/payments/payment_request.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 - (void)delayedNotifyDelegateOfSelection: | 114 - (void)delayedNotifyDelegateOfSelection: |
| 115 (autofill::AutofillProfile*)shippingAddress { | 115 (autofill::AutofillProfile*)shippingAddress { |
| 116 self.viewController.view.userInteractionEnabled = NO; | 116 self.viewController.view.userInteractionEnabled = NO; |
| 117 __weak ShippingAddressSelectionCoordinator* weakSelf = self; | 117 __weak ShippingAddressSelectionCoordinator* weakSelf = self; |
| 118 dispatch_after( | 118 dispatch_after( |
| 119 dispatch_time(DISPATCH_TIME_NOW, | 119 dispatch_time(DISPATCH_TIME_NOW, |
| 120 static_cast<int64_t>(0.2 * NSEC_PER_SEC)), | 120 static_cast<int64_t>(0.2 * NSEC_PER_SEC)), |
| 121 dispatch_get_main_queue(), ^{ | 121 dispatch_get_main_queue(), ^{ |
| 122 [weakSelf.mediator setState:PaymentRequestSelectorStatePending]; | 122 [weakSelf.mediator setState:PaymentRequestSelectorStatePending]; |
| 123 [weakSelf.viewController loadModel]; | 123 [weakSelf.viewController loadModel]; |
| 124 [[weakSelf.viewController collectionView] reloadData]; | 124 [weakSelf.viewController.collectionView reloadData]; |
| 125 | 125 |
| 126 [weakSelf.delegate shippingAddressSelectionCoordinator:weakSelf | 126 [weakSelf.delegate shippingAddressSelectionCoordinator:weakSelf |
| 127 didSelectShippingAddress:shippingAddress]; | 127 didSelectShippingAddress:shippingAddress]; |
| 128 }); | 128 }); |
| 129 } | 129 } |
| 130 | 130 |
| 131 @end | 131 @end |
| OLD | NEW |