OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "ios/clean/chrome/browser/ui/ntp/ntp_home_coordinator.h" |
| 6 |
| 7 #import "ios/chrome/browser/ui/ntp/google_landing_controller.h" |
| 8 #import "ios/clean/chrome/browser/ui/ntp/ntp_home_mediator.h" |
| 9 #import "ios/shared/chrome/browser/ui/browser_list/browser.h" |
| 10 #import "ios/shared/chrome/browser/ui/coordinators/browser_coordinator+internal.
h" |
| 11 |
| 12 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 13 #error "This file requires ARC support." |
| 14 #endif |
| 15 |
| 16 @interface NTPHomeCoordinator () |
| 17 @property(nonatomic, strong) NTPHomeMediator* mediator; |
| 18 @property(nonatomic, strong) UIViewController* viewController; |
| 19 @property(nonatomic, strong) GoogleLandingController* wrapperController; |
| 20 @end |
| 21 |
| 22 @implementation NTPHomeCoordinator |
| 23 @synthesize mediator = _mediator; |
| 24 @synthesize viewController = _viewController; |
| 25 @synthesize wrapperController = _wrapperController; |
| 26 |
| 27 - (void)start { |
| 28 // PLACEHOLDER: Re-using old view controllers for now. |
| 29 self.mediator = [[NTPHomeMediator alloc] init]; |
| 30 self.mediator.dispatcher = static_cast<id>(self.browser->dispatcher()); |
| 31 self.wrapperController = [[GoogleLandingController alloc] |
| 32 initWithLoader:self.mediator |
| 33 browserState:self.browser->browser_state() |
| 34 focuser:self.mediator |
| 35 webToolbarDelegate:nil |
| 36 tabModel:nil]; |
| 37 self.viewController = [[UIViewController alloc] init]; |
| 38 self.viewController.view = [self.wrapperController view]; |
| 39 [super start]; |
| 40 } |
| 41 |
| 42 @end |
OLD | NEW |