Index: ios/clean/chrome/browser/ui/animators/zoom_transition_controller.mm |
diff --git a/ios/clean/chrome/browser/ui/animators/zoom_transition_controller.mm b/ios/clean/chrome/browser/ui/animators/zoom_transition_controller.mm |
new file mode 100644 |
index 0000000000000000000000000000000000000000..11e377c23b215190510168936c48a63b1894c526 |
--- /dev/null |
+++ b/ios/clean/chrome/browser/ui/animators/zoom_transition_controller.mm |
@@ -0,0 +1,34 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#import "ios/clean/chrome/browser/ui/animators/zoom_transition_controller.h" |
+ |
+#import "ios/clean/chrome/browser/ui/animators/zoom_transition_animator.h" |
+ |
+@implementation ZoomTransitionController |
+@synthesize presentationKey = _presentationKey; |
+ |
+#pragma mark - UIViewControllerTransitioningDelegate |
+ |
+- (id<UIViewControllerAnimatedTransitioning>) |
+animationControllerForPresentedController:(UIViewController*)presented |
+ presentingController:(UIViewController*)presenting |
+ sourceController:(UIViewController*)source { |
+ ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init]; |
+ animator.presenting = YES; |
+ animator.presentationKey = self.presentationKey; |
+ [animator selectDelegate:@[ source, presenting ]]; |
+ return animator; |
+} |
+ |
+- (id<UIViewControllerAnimatedTransitioning>) |
+animationControllerForDismissedController:(UIViewController*)dismissed { |
+ ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init]; |
+ animator.presenting = NO; |
+ animator.presentationKey = self.presentationKey; |
+ [animator selectDelegate:@[ dismissed.presentingViewController ]]; |
+ return animator; |
+} |
+ |
+@end |