| 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 // ====== New Architecture ===== | 5 // ====== New Architecture ===== |
| 6 // = This code is only used in the new iOS Chrome architecture. = | 6 // = This code is only used in the new iOS Chrome architecture. = |
| 7 // ============================================================================ | 7 // ============================================================================ |
| 8 | 8 |
| 9 #import "ios/clean/chrome/browser/ui/tab/tab_coordinator.h" | 9 #import "ios/clean/chrome/browser/ui/tab/tab_coordinator.h" |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 self.viewController.toolbarViewController = toolbarCoordinator.viewController; | 70 self.viewController.toolbarViewController = toolbarCoordinator.viewController; |
| 71 self.viewController.contentViewController = webCoordinator.viewController; | 71 self.viewController.contentViewController = webCoordinator.viewController; |
| 72 | 72 |
| 73 [self.baseViewController presentViewController:self.viewController | 73 [self.baseViewController presentViewController:self.viewController |
| 74 animated:self.context.animated | 74 animated:self.context.animated |
| 75 completion:nil]; | 75 completion:nil]; |
| 76 } | 76 } |
| 77 | 77 |
| 78 - (void)stop { | 78 - (void)stop { |
| 79 [self.viewController dismissViewControllerAnimated:self.context.animated | 79 [self.viewController.presentingViewController |
| 80 completion:nil]; | 80 dismissViewControllerAnimated:self.context.animated |
| 81 completion:nil]; |
| 81 _webStateObserver.reset(); | 82 _webStateObserver.reset(); |
| 82 } | 83 } |
| 83 | 84 |
| 84 - (BOOL)canAddOverlayCoordinator:(BrowserCoordinator*)overlayCoordinator { | 85 - (BOOL)canAddOverlayCoordinator:(BrowserCoordinator*)overlayCoordinator { |
| 85 // This coordinator will always accept overlay coordinators. | 86 // This coordinator will always accept overlay coordinators. |
| 86 return YES; | 87 return YES; |
| 87 } | 88 } |
| 88 | 89 |
| 89 #pragma mark - Experiment support | 90 #pragma mark - Experiment support |
| 90 | 91 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 114 - (id<UIViewControllerAnimatedTransitioning>) | 115 - (id<UIViewControllerAnimatedTransitioning>) |
| 115 animationControllerForDismissedController:(UIViewController*)dismissed { | 116 animationControllerForDismissedController:(UIViewController*)dismissed { |
| 116 ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init]; | 117 ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init]; |
| 117 animator.presenting = NO; | 118 animator.presenting = NO; |
| 118 animator.presentationKey = self.presentationKey; | 119 animator.presentationKey = self.presentationKey; |
| 119 [animator selectDelegate:@[ dismissed.presentingViewController ]]; | 120 [animator selectDelegate:@[ dismissed.presentingViewController ]]; |
| 120 return animator; | 121 return animator; |
| 121 } | 122 } |
| 122 | 123 |
| 123 @end | 124 @end |
| OLD | NEW |