Index: ios/clean/chrome/browser/ui/ntp/new_tab_page_home_coordinator.mm |
diff --git a/ios/clean/chrome/browser/ui/ntp/new_tab_page_home_coordinator.mm b/ios/clean/chrome/browser/ui/ntp/new_tab_page_home_coordinator.mm |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c5480f9dd1e1be487597eac020e3a3d2fc7ff857 |
--- /dev/null |
+++ b/ios/clean/chrome/browser/ui/ntp/new_tab_page_home_coordinator.mm |
@@ -0,0 +1,45 @@ |
+// 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/ntp/new_tab_page_home_coordinator.h" |
+ |
+#import "ios/chrome/browser/ui/ntp/google_landing_controller.h" |
+#import "ios/clean/chrome/browser/ui/ntp/new_tab_page_home_mediator.h" |
+#import "ios/shared/chrome/browser/coordinator_context/coordinator_context.h" |
+#import "ios/shared/chrome/browser/ui/browser_list/browser.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 NTPHomeCoordinator () |
+@property(nonatomic, strong) NTPHomeMediator* mediator; |
+@property(nonatomic, strong) UIViewController* viewController; |
+@property(nonatomic, strong) GoogleLandingController* wrapperViewController; |
lpromero
2017/04/06 13:01:05
This is not a view controller. Should the property
justincohen
2017/04/06 18:25:10
Done.
|
+@end |
+ |
+@implementation NTPHomeCoordinator |
+@synthesize mediator = _mediator; |
+@synthesize viewController = _viewController; |
+@synthesize webState = _webState; |
+@synthesize wrapperViewController = _wrapperViewController; |
+ |
+- (void)start { |
+ // PLACEHOLDER: Re-using old view controllers for now. |
+ DCHECK(self.webState); |
+ self.mediator = [[NTPHomeMediator alloc] init]; |
+ self.mediator.webState = self.webState; |
+ self.wrapperViewController = [[GoogleLandingController alloc] |
+ initWithLoader:self.mediator |
+ browserState:self.browser->browser_state() |
+ focuser:self.mediator |
+ webToolbarDelegate:nil |
+ tabModel:nil]; |
+ self.viewController = [[UIViewController alloc] init]; |
+ self.viewController.view = [self.wrapperViewController view]; |
+ [super start]; |
+} |
+ |
+@end |