| OLD | NEW |
| (Empty) |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #import "ios/clean/chrome/browser/ui/animators/zoom_transition_controller.h" | |
| 6 | |
| 7 #import "ios/clean/chrome/browser/ui/animators/zoom_transition_animator.h" | |
| 8 | |
| 9 @implementation ZoomTransitionController | |
| 10 @synthesize presentationKey = _presentationKey; | |
| 11 | |
| 12 #pragma mark - UIViewControllerTransitioningDelegate | |
| 13 | |
| 14 - (id<UIViewControllerAnimatedTransitioning>) | |
| 15 animationControllerForPresentedController:(UIViewController*)presented | |
| 16 presentingController:(UIViewController*)presenting | |
| 17 sourceController:(UIViewController*)source { | |
| 18 ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init]; | |
| 19 animator.presenting = YES; | |
| 20 animator.presentationKey = self.presentationKey; | |
| 21 [animator selectDelegate:@[ source, presenting ]]; | |
| 22 return animator; | |
| 23 } | |
| 24 | |
| 25 - (id<UIViewControllerAnimatedTransitioning>) | |
| 26 animationControllerForDismissedController:(UIViewController*)dismissed { | |
| 27 ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init]; | |
| 28 animator.presenting = NO; | |
| 29 animator.presentationKey = self.presentationKey; | |
| 30 [animator selectDelegate:@[ dismissed.presentingViewController ]]; | |
| 31 return animator; | |
| 32 } | |
| 33 | |
| 34 @end | |
| OLD | NEW |