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

Unified Diff: ios/clean/chrome/browser/ui/ntp/ntp_home_coordinator.mm

Issue 2935653002: [ios clean] Move dispatcher out of Browser.
Patch Set: Dispatcher out of Browser. Created 3 years, 6 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/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 92484b3c5cb39246c8e61efa96255d3fc481aef3..c3c56fa2ec1bc99f5aaec86dca8b7ffb0252c0bd 100644
--- a/ios/clean/chrome/browser/ui/ntp/ntp_home_coordinator.mm
+++ b/ios/clean/chrome/browser/ui/ntp/ntp_home_coordinator.mm
@@ -29,20 +29,19 @@
- (void)start {
// PLACEHOLDER: self.mediator and self.oldMediator should be merged together.
self.mediator = [[NTPHomeMediator alloc] init];
- self.mediator.dispatcher = static_cast<id>(self.browser->dispatcher());
+ self.mediator.dispatcher = self.callableDispatcher;
// PLACEHOLDER: These will go elsewhere.
- [self.browser->dispatcher() startDispatchingToTarget:self.mediator
- forProtocol:@protocol(UrlLoader)];
- [self.browser->dispatcher()
- startDispatchingToTarget:self.mediator
- forProtocol:@protocol(OmniboxFocuser)];
+ [self.dispatcher startDispatchingToTarget:self.mediator
+ forProtocol:@protocol(UrlLoader)];
+ [self.dispatcher startDispatchingToTarget:self.mediator
+ forProtocol:@protocol(OmniboxFocuser)];
self.viewController = [[GoogleLandingViewController alloc] init];
- self.viewController.dispatcher = static_cast<id>(self.browser->dispatcher());
+ self.viewController.dispatcher = self.callableDispatcher;
self.googleLandingMediator = [[GoogleLandingMediator alloc]
initWithConsumer:self.viewController
browserState:self.browser->browser_state()
- dispatcher:static_cast<id>(self.browser->dispatcher())
+ dispatcher:self.callableDispatcher
webStateList:&self.browser->web_state_list()];
self.viewController.dataSource = self.googleLandingMediator;
[super start];
@@ -52,9 +51,8 @@
[super stop];
[self.googleLandingMediator shutdown];
- [self.browser->dispatcher() stopDispatchingForProtocol:@protocol(UrlLoader)];
- [self.browser->dispatcher()
- stopDispatchingForProtocol:@protocol(OmniboxFocuser)];
+ [self.dispatcher stopDispatchingForProtocol:@protocol(UrlLoader)];
+ [self.dispatcher stopDispatchingForProtocol:@protocol(OmniboxFocuser)];
}
@end

Powered by Google App Engine
This is Rietveld 408576698