Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Side by Side Diff: ios/chrome/browser/payments/shipping_address_selection_coordinator.mm

Issue 2826713002: [Payment Request] Refactors the remaining selector view controllers (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698