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

Unified Diff: ios/clean/chrome/browser/ui/tools/tools_coordinator.mm

Issue 2906313003: [ios clean] ToolsMenu Mediator observes Webstate. (Closed)
Patch Set: Improved comments and test nits Created 3 years, 7 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/tools/tools_coordinator.mm
diff --git a/ios/clean/chrome/browser/ui/tools/tools_coordinator.mm b/ios/clean/chrome/browser/ui/tools/tools_coordinator.mm
index 5e13f6d4006188a4cb251d69728f4b80e1012122..bc1c573b5a73881aeae3667d20971adfc3b9b739 100644
--- a/ios/clean/chrome/browser/ui/tools/tools_coordinator.mm
+++ b/ios/clean/chrome/browser/ui/tools/tools_coordinator.mm
@@ -23,6 +23,7 @@
@synthesize viewController = _viewController;
@synthesize mediator = _mediator;
@synthesize toolsMenuConfiguration = _toolsMenuConfiguration;
+@synthesize webState = _webState;
#pragma mark - BrowserCoordinator
@@ -33,10 +34,22 @@
self.viewController.dispatcher = static_cast<id>(self.browser->dispatcher());
self.mediator =
[[ToolsMediator alloc] initWithConsumer:self.viewController
- andConfiguration:self.toolsMenuConfiguration];
+ configuration:self.toolsMenuConfiguration];
+ if (self.webState) {
+ self.mediator.webState = self.webState;
+ }
[super start];
}
+#pragma mark - Setters
+
+- (void)setWebState:(web::WebState*)webState {
+ _webState = webState;
+ if (self.mediator) {
+ self.mediator.webState = self.webState;
+ }
+}
+
#pragma mark - UIViewControllerTransitioningDelegate
- (id<UIViewControllerAnimatedTransitioning>)

Powered by Google App Engine
This is Rietveld 408576698