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

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

Issue 2645973005: Coordinators: let the presenting view controller dismiss. (Closed)
Patch Set: Rebased Created 3 years, 10 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
« no previous file with comments | « no previous file | ios/chrome/browser/ui/alert_coordinator/loading_alert_coordinator.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/payment_request_coordinator.h" 5 #import "ios/chrome/browser/payments/payment_request_coordinator.h"
6 6
7 #include <unordered_set> 7 #include <unordered_set>
8 #include <vector> 8 #include <vector>
9 9
10 #import "base/ios/weak_nsobject.h" 10 #import "base/ios/weak_nsobject.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 _navigationController.reset([[UINavigationController alloc] 105 _navigationController.reset([[UINavigationController alloc]
106 initWithRootViewController:_viewController]); 106 initWithRootViewController:_viewController]);
107 [_navigationController setNavigationBarHidden:YES]; 107 [_navigationController setNavigationBarHidden:YES];
108 108
109 [[self baseViewController] presentViewController:_navigationController 109 [[self baseViewController] presentViewController:_navigationController
110 animated:YES 110 animated:YES
111 completion:nil]; 111 completion:nil];
112 } 112 }
113 113
114 - (void)stop { 114 - (void)stop {
115 [_navigationController dismissViewControllerAnimated:YES completion:nil]; 115 [[_navigationController presentingViewController]
116 dismissViewControllerAnimated:YES
117 completion:nil];
116 _itemsDisplayCoordinator.reset(); 118 _itemsDisplayCoordinator.reset();
117 _shippingAddressSelectionCoordinator.reset(); 119 _shippingAddressSelectionCoordinator.reset();
118 _shippingOptionSelectionCoordinator.reset(); 120 _shippingOptionSelectionCoordinator.reset();
119 _methodSelectionCoordinator.reset(); 121 _methodSelectionCoordinator.reset();
120 _navigationController.reset(); 122 _navigationController.reset();
121 _viewController.reset(); 123 _viewController.reset();
122 } 124 }
123 125
124 - (std::vector<autofill::CreditCard*>)supportedMethods { 126 - (std::vector<autofill::CreditCard*>)supportedMethods {
125 std::vector<autofill::CreditCard*> supported_methods; 127 std::vector<autofill::CreditCard*> supported_methods;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 _methodSelectionCoordinator.reset(); 334 _methodSelectionCoordinator.reset();
333 } 335 }
334 336
335 - (void)paymentMethodSelectionCoordinatorDidReturn: 337 - (void)paymentMethodSelectionCoordinatorDidReturn:
336 (PaymentMethodSelectionCoordinator*)coordinator { 338 (PaymentMethodSelectionCoordinator*)coordinator {
337 [_methodSelectionCoordinator stop]; 339 [_methodSelectionCoordinator stop];
338 _methodSelectionCoordinator.reset(); 340 _methodSelectionCoordinator.reset();
339 } 341 }
340 342
341 @end 343 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/ui/alert_coordinator/loading_alert_coordinator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698