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

Unified Diff: ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm

Issue 2780423003: [ios] Use web_state_list in web_contents_mediator. (Closed)
Patch Set: Rebase. Created 3 years, 8 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
« no previous file with comments | « ios/clean/chrome/browser/ui/web_contents/web_contents_mediator_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
diff --git a/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm b/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
index ba0be5ad2fcfa77e69342add322d78126a63155e..040b690db59ea01a81da87d36677585de9eddb1c 100644
--- a/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
+++ b/ios/clean/chrome/browser/ui/web_contents/web_coordinator.mm
@@ -8,6 +8,7 @@
#import "ios/clean/chrome/browser/ui/context_menu/web_context_menu_coordinator.h"
#import "ios/clean/chrome/browser/ui/web_contents/web_contents_mediator.h"
#import "ios/clean/chrome/browser/ui/web_contents/web_contents_view_controller.h"
+#import "ios/shared/chrome/browser/ui/browser_list/browser.h"
#import "ios/shared/chrome/browser/ui/coordinators/browser_coordinator+internal.h"
#include "ios/web/public/web_state/web_state.h"
#import "ios/web/public/web_state/web_state_delegate_bridge.h"
@@ -37,22 +38,22 @@
}
- (void)setWebState:(web::WebState*)webState {
+ // PLACEHOLDER: The web state delegate will be set by another object, and
+ // this coordinator will not need to know the active web state.
_webState = webState;
self.webState->SetDelegate(_webStateDelegate.get());
- self.mediator.webState = self.webState;
}
- (void)start {
self.viewController = [[WebContentsViewController alloc] init];
self.mediator.consumer = self.viewController;
+ self.mediator.webStateList = &self.browser->web_state_list();
[super start];
}
- (void)stop {
[super stop];
- // PLACEHOLDER: This is how the webUsageEnabled is set to false. Find a
- // better way in the future.
- self.mediator.webState = nullptr;
+ [self.mediator disconnect];
}
- (void)childCoordinatorDidStart:(BrowserCoordinator*)childCoordinator {
« no previous file with comments | « ios/clean/chrome/browser/ui/web_contents/web_contents_mediator_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698