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

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

Issue 2955033002: [ios clean] Moves animator and presenters under transitions (Closed)
Patch Set: Created 3 years, 5 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/tools/menu_view_controller.h" 7 #import "ios/clean/chrome/browser/ui/tools/menu_view_controller.h"
8 #import "ios/clean/chrome/browser/ui/tools/tools_mediator.h" 8 #import "ios/clean/chrome/browser/ui/tools/tools_mediator.h"
9 #import "ios/clean/chrome/browser/ui/tools/tools_menu_transition_controller.h" 9 #import "ios/clean/chrome/browser/ui/transitions/zooming_menu_transition_control ler.h"
10 #import "ios/shared/chrome/browser/ui/browser_list/browser.h" 10 #import "ios/shared/chrome/browser/ui/browser_list/browser.h"
11 11
12 #if !defined(__has_feature) || !__has_feature(objc_arc) 12 #if !defined(__has_feature) || !__has_feature(objc_arc)
13 #error "This file requires ARC support." 13 #error "This file requires ARC support."
14 #endif 14 #endif
15 15
16 @interface ToolsCoordinator () 16 @interface ToolsCoordinator ()
17 @property(nonatomic, strong) ToolsMediator* mediator; 17 @property(nonatomic, strong) ToolsMediator* mediator;
18 @property(nonatomic, strong) 18 @property(nonatomic, strong)
19 ToolsMenuTransitionController* transitionController; 19 ZoomingMenuTransitionController* transitionController;
20 @property(nonatomic, strong) MenuViewController* viewController; 20 @property(nonatomic, strong) MenuViewController* viewController;
21 @end 21 @end
22 22
23 @implementation ToolsCoordinator 23 @implementation ToolsCoordinator
24 @synthesize mediator = _mediator; 24 @synthesize mediator = _mediator;
25 @synthesize transitionController = _transitionController; 25 @synthesize transitionController = _transitionController;
26 @synthesize toolsMenuConfiguration = _toolsMenuConfiguration; 26 @synthesize toolsMenuConfiguration = _toolsMenuConfiguration;
27 @synthesize viewController = _viewController; 27 @synthesize viewController = _viewController;
28 @synthesize webState = _webState; 28 @synthesize webState = _webState;
29 29
30 #pragma mark - BrowserCoordinator 30 #pragma mark - BrowserCoordinator
31 31
32 - (void)start { 32 - (void)start {
33 self.viewController = [[MenuViewController alloc] init]; 33 self.viewController = [[MenuViewController alloc] init];
34 self.viewController.modalPresentationStyle = UIModalPresentationCustom; 34 self.viewController.modalPresentationStyle = UIModalPresentationCustom;
35 self.transitionController = [[ToolsMenuTransitionController alloc] 35 self.transitionController = [[ZoomingMenuTransitionController alloc]
36 initWithDispatcher:static_cast<id>(self.browser->dispatcher())]; 36 initWithDispatcher:static_cast<id>(self.browser->dispatcher())];
37 self.viewController.transitioningDelegate = self.transitionController; 37 self.viewController.transitioningDelegate = self.transitionController;
38 self.viewController.dispatcher = static_cast<id>(self.browser->dispatcher()); 38 self.viewController.dispatcher = static_cast<id>(self.browser->dispatcher());
39 self.mediator = 39 self.mediator =
40 [[ToolsMediator alloc] initWithConsumer:self.viewController 40 [[ToolsMediator alloc] initWithConsumer:self.viewController
41 configuration:self.toolsMenuConfiguration]; 41 configuration:self.toolsMenuConfiguration];
42 if (self.webState) { 42 if (self.webState) {
43 self.mediator.webState = self.webState; 43 self.mediator.webState = self.webState;
44 } 44 }
45 [super start]; 45 [super start];
46 } 46 }
47 47
48 #pragma mark - Setters 48 #pragma mark - Setters
49 49
50 - (void)setWebState:(web::WebState*)webState { 50 - (void)setWebState:(web::WebState*)webState {
51 _webState = webState; 51 _webState = webState;
52 if (self.mediator) { 52 if (self.mediator) {
53 self.mediator.webState = self.webState; 53 self.mediator.webState = self.webState;
54 } 54 }
55 } 55 }
56 56
57 @end 57 @end
OLDNEW
« no previous file with comments | « ios/clean/chrome/browser/ui/tools/BUILD.gn ('k') | ios/clean/chrome/browser/ui/tools/tools_menu_transition_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698