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

Side by Side Diff: ios/clean/chrome/browser/ui/tab/tab_coordinator.mm

Issue 2780423003: [ios] Use web_state_list in web_contents_mediator. (Closed)
Patch Set: Update unittests. Created 3 years, 8 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/tab/tab_coordinator.h" 5 #import "ios/clean/chrome/browser/ui/tab/tab_coordinator.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #pragma mark - BrowserCoordinator 45 #pragma mark - BrowserCoordinator
46 46
47 - (void)start { 47 - (void)start {
48 self.viewController = [self newTabContainer]; 48 self.viewController = [self newTabContainer];
49 self.viewController.transitioningDelegate = self; 49 self.viewController.transitioningDelegate = self;
50 self.viewController.modalPresentationStyle = UIModalPresentationCustom; 50 self.viewController.modalPresentationStyle = UIModalPresentationCustom;
51 _webStateObserver = 51 _webStateObserver =
52 base::MakeUnique<web::WebStateObserverBridge>(self.webState, self); 52 base::MakeUnique<web::WebStateObserverBridge>(self.webState, self);
53 53
54 WebCoordinator* webCoordinator = [[WebCoordinator alloc] init]; 54 WebCoordinator* webCoordinator = [[WebCoordinator alloc] init];
55 webCoordinator.webState = self.webState;
56 [self addChildCoordinator:webCoordinator]; 55 [self addChildCoordinator:webCoordinator];
57 // Unset the base view controller, so |webCoordinator| doesn't present its 56 // Unset the base view controller, so |webCoordinator| doesn't present its
58 // view controller. 57 // view controller.
59 webCoordinator.context.baseViewController = nil; 58 webCoordinator.context.baseViewController = nil;
60 [webCoordinator start]; 59 [webCoordinator start];
61 60
62 ToolbarCoordinator* toolbarCoordinator = [[ToolbarCoordinator alloc] init]; 61 ToolbarCoordinator* toolbarCoordinator = [[ToolbarCoordinator alloc] init];
63 toolbarCoordinator.webState = self.webState; 62 toolbarCoordinator.webState = self.webState;
64 [self addChildCoordinator:toolbarCoordinator]; 63 [self addChildCoordinator:toolbarCoordinator];
65 // Unset the base view controller, so |toolbarCoordinator| doesn't present 64 // Unset the base view controller, so |toolbarCoordinator| doesn't present
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 - (id<UIViewControllerAnimatedTransitioning>) 149 - (id<UIViewControllerAnimatedTransitioning>)
151 animationControllerForDismissedController:(UIViewController*)dismissed { 150 animationControllerForDismissedController:(UIViewController*)dismissed {
152 ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init]; 151 ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init];
153 animator.presenting = NO; 152 animator.presenting = NO;
154 animator.presentationKey = self.presentationKey; 153 animator.presentationKey = self.presentationKey;
155 [animator selectDelegate:@[ dismissed.presentingViewController ]]; 154 [animator selectDelegate:@[ dismissed.presentingViewController ]];
156 return animator; 155 return animator;
157 } 156 }
158 157
159 @end 158 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698