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

Unified Diff: ios/clean/chrome/browser/ui/tab_strip/tab_strip_container_coordinator.mm

Issue 2711343003: [tab_container] Remove tab_strip container (Closed)
Patch Set: Rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ios/clean/chrome/browser/ui/tab_strip/tab_strip_container_coordinator.mm
diff --git a/ios/clean/chrome/browser/ui/tab_strip/tab_strip_container_coordinator.mm b/ios/clean/chrome/browser/ui/tab_strip/tab_strip_container_coordinator.mm
deleted file mode 100644
index bc0300fb3de51b1d3b2ad04d5314e2579a7ad9d4..0000000000000000000000000000000000000000
--- a/ios/clean/chrome/browser/ui/tab_strip/tab_strip_container_coordinator.mm
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "ios/clean/chrome/browser/ui/tab_strip/tab_strip_container_coordinator.h"
-
-#include <memory>
-
-#include "base/memory/ptr_util.h"
-#import "ios/clean/chrome/browser/ui/actions/tab_grid_actions.h"
-#import "ios/clean/chrome/browser/ui/animators/zoom_transition_animator.h"
-#import "ios/clean/chrome/browser/ui/tab/tab_coordinator.h"
-#import "ios/clean/chrome/browser/ui/tab_strip/tab_strip_container_view_controller.h"
-#import "ios/shared/chrome/browser/coordinator_context/coordinator_context.h"
-#import "ios/shared/chrome/browser/ui/coordinators/browser_coordinator+internal.h"
-
-#if !defined(__has_feature) || !__has_feature(objc_arc)
-#error "This file requires ARC support."
-#endif
-
-@interface TabStripContainerCoordinator ()<
- UIViewControllerTransitioningDelegate>
-@property(nonatomic, strong) TabStripContainerViewController* viewController;
-@end
-
-@implementation TabStripContainerCoordinator
-
-@synthesize presentationKey = _presentationKey;
-@synthesize viewController = _viewController;
-@synthesize webState = _webState;
-
-- (void)start {
- self.viewController = [[TabStripContainerViewController alloc] init];
- self.viewController.transitioningDelegate = self;
- self.viewController.modalPresentationStyle = UIModalPresentationCustom;
-
- TabCoordinator* tabCoordinator = [[TabCoordinator alloc] init];
- tabCoordinator.webState = self.webState;
- [self addChildCoordinator:tabCoordinator];
- // Unset the base view controller, so |tabCoordinator| doesn't present
- // its view controller.
- tabCoordinator.context.baseViewController = nil;
- [tabCoordinator start];
-
- // PLACEHOLDER: Replace this placeholder with an actual tab strip view
- // controller.
- UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom];
- [button addTarget:nil
- action:@selector(showTabGrid:)
- forControlEvents:UIControlEventTouchUpInside];
- [button setTitle:@"Tab grid" forState:UIControlStateNormal];
- button.frame = CGRectMake(10, 10, 100, 100);
-
- UIViewController* tabStripViewController = [[UIViewController alloc] init];
- tabStripViewController.view.backgroundColor = [UIColor blackColor];
- [tabStripViewController.view addSubview:button];
- self.viewController.tabStripViewController = tabStripViewController;
- self.viewController.contentViewController = tabCoordinator.viewController;
-
- [self.context.baseViewController presentViewController:self.viewController
- animated:self.context.animated
- completion:nil];
- [super start];
-}
-
-- (void)stop {
- [super stop];
- [self.viewController.presentingViewController
- dismissViewControllerAnimated:self.context.animated
- completion:nil];
- self.viewController = nil;
-}
-
-- (BOOL)canAddOverlayCoordinator:(BrowserCoordinator*)overlayCoordinator {
- // This coordinator will always accept overlay coordinators.
- return YES;
-}
-
-#pragma mark - UIViewControllerTransitioningDelegate
-
-- (id<UIViewControllerAnimatedTransitioning>)
-animationControllerForPresentedController:(UIViewController*)presented
- presentingController:(UIViewController*)presenting
- sourceController:(UIViewController*)source {
- ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init];
- animator.presenting = YES;
- animator.presentationKey = self.presentationKey;
- [animator selectDelegate:@[ source, presenting ]];
- return animator;
-}
-
-- (id<UIViewControllerAnimatedTransitioning>)
-animationControllerForDismissedController:(UIViewController*)dismissed {
- ZoomTransitionAnimator* animator = [[ZoomTransitionAnimator alloc] init];
- animator.presenting = NO;
- animator.presentationKey = self.presentationKey;
- [animator selectDelegate:@[ dismissed.presentingViewController ]];
- return animator;
-}
-
-@end

Powered by Google App Engine
This is Rietveld 408576698