| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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/clean/chrome/browser/ui/tools/tools_menu_transition_controller.h" | 5 #import "ios/clean/chrome/browser/ui/transitions/zooming_menu_transition_control
ler.h" |
| 6 | 6 |
| 7 #import "ios/clean/chrome/browser/ui/presenters/menu_presentation_controller.h" | 7 #import "ios/clean/chrome/browser/ui/transitions/presenters/menu_presentation_co
ntroller.h" |
| 8 | 8 |
| 9 @interface ToolsMenuTransitionController () | 9 @interface ZoomingMenuTransitionController () |
| 10 @property(nonatomic, weak) id<ToolsMenuCommands> dispatcher; | 10 @property(nonatomic, weak) id<ToolsMenuCommands> dispatcher; |
| 11 @end | 11 @end |
| 12 | 12 |
| 13 @implementation ToolsMenuTransitionController | 13 @implementation ZoomingMenuTransitionController |
| 14 @synthesize dispatcher = _dispatcher; | 14 @synthesize dispatcher = _dispatcher; |
| 15 | 15 |
| 16 - (instancetype)initWithDispatcher:(id<ToolsMenuCommands>)dispatcher { | 16 - (instancetype)initWithDispatcher:(id<ToolsMenuCommands>)dispatcher { |
| 17 self = [super init]; | 17 self = [super init]; |
| 18 if (self) { | 18 if (self) { |
| 19 _dispatcher = dispatcher; | 19 _dispatcher = dispatcher; |
| 20 } | 20 } |
| 21 return self; | 21 return self; |
| 22 } | 22 } |
| 23 | 23 |
| 24 - (UIPresentationController*) | 24 - (UIPresentationController*) |
| 25 presentationControllerForPresentedViewController:(UIViewController*)presented | 25 presentationControllerForPresentedViewController:(UIViewController*)presented |
| 26 presentingViewController:(UIViewController*)presenting | 26 presentingViewController:(UIViewController*)presenting |
| 27 sourceViewController:(UIViewController*)source { | 27 sourceViewController:(UIViewController*)source { |
| 28 MenuPresentationController* menuPresentation = | 28 MenuPresentationController* menuPresentation = |
| 29 [[MenuPresentationController alloc] | 29 [[MenuPresentationController alloc] |
| 30 initWithPresentedViewController:presented | 30 initWithPresentedViewController:presented |
| 31 presentingViewController:presenting]; | 31 presentingViewController:presenting]; |
| 32 menuPresentation.dispatcher = static_cast<id>(self.dispatcher); | 32 menuPresentation.dispatcher = self.dispatcher; |
| 33 return menuPresentation; | 33 return menuPresentation; |
| 34 } | 34 } |
| 35 | 35 |
| 36 @end | 36 @end |
| OLD | NEW |