Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(646)

Side by Side Diff: ios/clean/chrome/browser/ui/tools/tools_coordinator.mm

Issue 2935653002: [ios clean] Move dispatcher out of Browser.
Patch Set: Dispatcher out of Browser. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #import "ios/clean/chrome/browser/ui/tools/tools_coordinator.h" 5 #import "ios/clean/chrome/browser/ui/tools/tools_coordinator.h"
6 6
7 #import "ios/clean/chrome/browser/ui/animators/zoom_transition_animator.h" 7 #import "ios/clean/chrome/browser/ui/animators/zoom_transition_animator.h"
8 #import "ios/clean/chrome/browser/ui/presenters/menu_presentation_controller.h" 8 #import "ios/clean/chrome/browser/ui/presenters/menu_presentation_controller.h"
9 #import "ios/clean/chrome/browser/ui/tools/menu_view_controller.h" 9 #import "ios/clean/chrome/browser/ui/tools/menu_view_controller.h"
10 #import "ios/clean/chrome/browser/ui/tools/tools_mediator.h" 10 #import "ios/clean/chrome/browser/ui/tools/tools_mediator.h"
(...skipping 13 matching lines...) Expand all
24 @synthesize mediator = _mediator; 24 @synthesize mediator = _mediator;
25 @synthesize toolsMenuConfiguration = _toolsMenuConfiguration; 25 @synthesize toolsMenuConfiguration = _toolsMenuConfiguration;
26 @synthesize webState = _webState; 26 @synthesize webState = _webState;
27 27
28 #pragma mark - BrowserCoordinator 28 #pragma mark - BrowserCoordinator
29 29
30 - (void)start { 30 - (void)start {
31 self.viewController = [[MenuViewController alloc] init]; 31 self.viewController = [[MenuViewController alloc] init];
32 self.viewController.modalPresentationStyle = UIModalPresentationCustom; 32 self.viewController.modalPresentationStyle = UIModalPresentationCustom;
33 self.viewController.transitioningDelegate = self; 33 self.viewController.transitioningDelegate = self;
34 self.viewController.dispatcher = static_cast<id>(self.browser->dispatcher()); 34 self.viewController.dispatcher = self.callableDispatcher;
35 self.mediator = 35 self.mediator =
36 [[ToolsMediator alloc] initWithConsumer:self.viewController 36 [[ToolsMediator alloc] initWithConsumer:self.viewController
37 configuration:self.toolsMenuConfiguration]; 37 configuration:self.toolsMenuConfiguration];
38 if (self.webState) { 38 if (self.webState) {
39 self.mediator.webState = self.webState; 39 self.mediator.webState = self.webState;
40 } 40 }
41 [super start]; 41 [super start];
42 } 42 }
43 43
44 #pragma mark - Setters 44 #pragma mark - Setters
(...skipping 26 matching lines...) Expand all
71 } 71 }
72 72
73 - (UIPresentationController*) 73 - (UIPresentationController*)
74 presentationControllerForPresentedViewController:(UIViewController*)presented 74 presentationControllerForPresentedViewController:(UIViewController*)presented
75 presentingViewController:(UIViewController*)presenting 75 presentingViewController:(UIViewController*)presenting
76 sourceViewController:(UIViewController*)source { 76 sourceViewController:(UIViewController*)source {
77 MenuPresentationController* menuPresentation = 77 MenuPresentationController* menuPresentation =
78 [[MenuPresentationController alloc] 78 [[MenuPresentationController alloc]
79 initWithPresentedViewController:presented 79 initWithPresentedViewController:presented
80 presentingViewController:presenting]; 80 presentingViewController:presenting];
81 menuPresentation.dispatcher = static_cast<id>(self.browser->dispatcher()); 81 menuPresentation.dispatcher = self.callableDispatcher;
82 return menuPresentation; 82 return menuPresentation;
83 } 83 }
84 84
85 @end 85 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698