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 278b63785c031642bfeb54e08e52a48f9884556e..217ab4959e1d1ad292178ca0c0c41f9e5297bf53 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,16 +30,29 @@ |
// 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()]; |
self.viewController.dataSource = self.googleLandingMediator; |
+ self.googleLandingMediator.dispatcher = self.browser->dispatcher(); |
[super start]; |
} |
+- (void)stop { |
+ [self.browser->dispatcher() stopDispatchingForProtocol:@protocol(UrlLoader)]; |
+ [self.browser->dispatcher() |
+ stopDispatchingForProtocol:@protocol(OmniboxFocuser)]; |
+ [super stop]; |
+} |
+ |
@end |