Chromium Code Reviews| Index: ios/clean/chrome/browser/ui/ntp/ntp_home_coordinator.mm |
| diff --git a/ios/clean/chrome/browser/ui/ntp/ntp_home_coordinator.mm b/ios/clean/chrome/browser/ui/ntp/ntp_home_coordinator.mm |
| index dd8932af9a02311100970c7b905e826728daef87..8acee7074d445faa03f792888c166dbbba7bd861 100644 |
| --- a/ios/clean/chrome/browser/ui/ntp/ntp_home_coordinator.mm |
| +++ b/ios/clean/chrome/browser/ui/ntp/ntp_home_coordinator.mm |
| @@ -8,6 +8,7 @@ |
| #import "ios/chrome/browser/ui/ntp/google_landing_mediator.h" |
| #import "ios/clean/chrome/browser/ui/ntp/ntp_home_mediator.h" |
| #import "ios/shared/chrome/browser/ui/browser_list/browser.h" |
| +#import "ios/shared/chrome/browser/ui/commands/command_dispatcher.h" |
| #import "ios/shared/chrome/browser/ui/coordinators/browser_coordinator+internal.h" |
| #if !defined(__has_feature) || !__has_feature(objc_arc) |
| @@ -29,14 +30,20 @@ |
| // PLACEHOLDER: self.mediator and self.oldMediator should be merged together. |
| self.mediator = [[NTPHomeMediator alloc] init]; |
| self.mediator.dispatcher = static_cast<id>(self.browser->dispatcher()); |
| + |
| + // PLACEHOLDER: These will go elsewhere. |
| + [self.browser->dispatcher() startDispatchingToTarget:self.mediator |
| + forProtocol:@protocol(UrlLoader)]; |
| + [self.browser->dispatcher() |
| + startDispatchingToTarget:self.mediator |
| + forProtocol:@protocol(OmniboxFocuser)]; |
| self.viewController = [[GoogleLandingController alloc] init]; |
| + self.viewController.dispatcher = static_cast<id>(self.browser->dispatcher()); |
| self.googleLandingMediator = [[GoogleLandingMediator alloc] |
| - initWithConsumer:self.viewController |
| - browserState:self.browser->browser_state() |
| - loader:self.mediator |
| - focuser:self.mediator |
| - webToolbarDelegate:nil |
| - webStateList:&self.browser->web_state_list()]; |
| + initWithConsumer:self.viewController |
| + browserState:self.browser->browser_state() |
| + dispatcher:static_cast<id>(self.browser->dispatcher()) |
| + webStateList:&self.browser->web_state_list()]; |
| self.viewController.dataSource = self.googleLandingMediator; |
| [super start]; |
| } |
| @@ -44,6 +51,11 @@ |
| - (void)stop { |
| [super stop]; |
| [self.googleLandingMediator shutdown]; |
| + |
| + [self.browser->dispatcher() stopDispatchingForProtocol:@protocol(UrlLoader)]; |
| + [self.browser->dispatcher() |
| + stopDispatchingForProtocol:@protocol(OmniboxFocuser)]; |
| + [super stop]; |
|
rohitrao (ping after 24h)
2017/04/28 11:56:22
You've got two [super stop]s in here. Bad merge?
justincohen
2017/04/28 14:02:20
bad merge!
|
| } |
| @end |