| 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_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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |