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

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

Issue 2645973005: Coordinators: let the presenting view controller dismiss. (Closed)
Patch Set: Rebased Created 3 years, 10 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
« no previous file with comments | « ios/clean/chrome/browser/ui/tab_strip/tab_strip_container_coordinator.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // ====== New Architecture ===== 5 // ====== New Architecture =====
6 // = This code is only used in the new iOS Chrome architecture. = 6 // = This code is only used in the new iOS Chrome architecture. =
7 // ============================================================================ 7 // ============================================================================
8 8
9 #import "ios/clean/chrome/browser/ui/tools/tools_coordinator.h" 9 #import "ios/clean/chrome/browser/ui/tools/tools_coordinator.h"
10 10
(...skipping 20 matching lines...) Expand all
31 self.menuViewController = [[MenuViewController alloc] init]; 31 self.menuViewController = [[MenuViewController alloc] init];
32 self.menuViewController.modalPresentationStyle = UIModalPresentationCustom; 32 self.menuViewController.modalPresentationStyle = UIModalPresentationCustom;
33 self.menuViewController.transitioningDelegate = self; 33 self.menuViewController.transitioningDelegate = self;
34 34
35 [self.baseViewController presentViewController:self.menuViewController 35 [self.baseViewController presentViewController:self.menuViewController
36 animated:self.context.animated 36 animated:self.context.animated
37 completion:nil]; 37 completion:nil];
38 } 38 }
39 39
40 - (void)stop { 40 - (void)stop {
41 [self.menuViewController dismissViewControllerAnimated:self.context.animated 41 [self.menuViewController.presentingViewController
42 completion:nil]; 42 dismissViewControllerAnimated:self.context.animated
43 completion:nil];
43 } 44 }
44 45
45 #pragma mark - UIViewControllerTransitioningDelegate 46 #pragma mark - UIViewControllerTransitioningDelegate
46 47
47 - (id<UIViewControllerAnimatedTransitioning>) 48 - (id<UIViewControllerAnimatedTransitioning>)
48 animationControllerForPresentedController:(UIViewController*)presented 49 animationControllerForPresentedController:(UIViewController*)presented
49 presentingController:(UIViewController*)presenting 50 presentingController:(UIViewController*)presenting
50 sourceController:(UIViewController*)source { 51 sourceController:(UIViewController*)source {
51 ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init]; 52 ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init];
52 animator.presenting = YES; 53 animator.presenting = YES;
(...skipping 15 matching lines...) Expand all
68 sourceViewController:(UIViewController*)source { 69 sourceViewController:(UIViewController*)source {
69 MenuPresentationController* menuPresentation = 70 MenuPresentationController* menuPresentation =
70 [[MenuPresentationController alloc] 71 [[MenuPresentationController alloc]
71 initWithPresentedViewController:presented 72 initWithPresentedViewController:presented
72 presentingViewController:presenting]; 73 presentingViewController:presenting];
73 menuPresentation.toolbarCommandHandler = self.toolbarCommandHandler; 74 menuPresentation.toolbarCommandHandler = self.toolbarCommandHandler;
74 return menuPresentation; 75 return menuPresentation;
75 } 76 }
76 77
77 @end 78 @end
OLDNEW
« no previous file with comments | « ios/clean/chrome/browser/ui/tab_strip/tab_strip_container_coordinator.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698