Chromium Code Reviews| 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/tools/tools_menu_transition_controller.h" | |
| 6 | |
| 7 #import "ios/clean/chrome/browser/ui/presenters/menu_presentation_controller.h" | |
| 8 | |
| 9 @interface ToolsMenuTransitionController () | |
| 10 @property(nonatomic, weak) id<ToolsMenuCommands> dispatcher; | |
| 11 @end | |
| 12 | |
| 13 @implementation ToolsMenuTransitionController | |
| 14 @synthesize dispatcher = _dispatcher; | |
| 15 | |
| 16 - (instancetype)initWithDispatcher:(id<ToolsMenuCommands>)dispatcher { | |
| 17 self = [super init]; | |
| 18 if (self) { | |
| 19 _dispatcher = dispatcher; | |
| 20 } | |
| 21 return self; | |
| 22 } | |
| 23 | |
| 24 - (UIPresentationController*) | |
| 25 presentationControllerForPresentedViewController:(UIViewController*)presented | |
| 26 presentingViewController:(UIViewController*)presenting | |
| 27 sourceViewController:(UIViewController*)source { | |
| 28 MenuPresentationController* menuPresentation = | |
| 29 [[MenuPresentationController alloc] | |
| 30 initWithPresentedViewController:presented | |
| 31 presentingViewController:presenting]; | |
| 32 menuPresentation.dispatcher = static_cast<id>(self.dispatcher); | |
|
marq (ping after 24h)
2017/06/23 09:18:49
Shouldn't menuPresentation.dispatcher already be a
sczs
2017/06/23 14:50:20
Yes! I copied this code over and didn't change thi
| |
| 33 return menuPresentation; | |
| 34 } | |
| 35 | |
| 36 @end | |
| OLD | NEW |