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

Unified Diff: ios/clean/chrome/browser/ui/tab/tab_coordinator.mm

Issue 2708013002: [ios clean] Creates ToolbarWebState Mediator (Closed)
Patch Set: Renaming feedback Created 3 years, 10 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/tab/tab_coordinator.mm
diff --git a/ios/clean/chrome/browser/ui/tab/tab_coordinator.mm b/ios/clean/chrome/browser/ui/tab/tab_coordinator.mm
index 069e1a972c14074aa539853a75d7eb06c686441d..e652bcbf6113efb0cf35f98a79d1ccbd4a144d9d 100644
--- a/ios/clean/chrome/browser/ui/tab/tab_coordinator.mm
+++ b/ios/clean/chrome/browser/ui/tab/tab_coordinator.mm
@@ -18,7 +18,6 @@
#import "ios/clean/chrome/browser/ui/toolbar/toolbar_coordinator.h"
#import "ios/clean/chrome/browser/ui/web_contents/web_coordinator.h"
#import "ios/shared/chrome/browser/coordinator_context/coordinator_context.h"
-#import "ios/web/public/web_state/web_state_observer_bridge.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -34,10 +33,7 @@ const BOOL kUseBottomToolbar = NO;
@property(nonatomic, strong) TabContainerViewController* viewController;
@end
-@implementation TabCoordinator {
- std::unique_ptr<web::WebStateObserverBridge> _webStateObserver;
-}
-
+@implementation TabCoordinator
@synthesize presentationKey = _presentationKey;
@synthesize viewController = _viewController;
@synthesize webState = _webState;
@@ -56,11 +52,9 @@ const BOOL kUseBottomToolbar = NO;
[webCoordinator start];
ToolbarCoordinator* toolbarCoordinator = [[ToolbarCoordinator alloc] init];
+ toolbarCoordinator.webState = self.webState;
[self addChildCoordinator:toolbarCoordinator];
- // PLACEHOLDER : Pass the WebState into the toolbar coordinator and let it
- // create a mediator (or whatever) that observes the webState.
- _webStateObserver = base::MakeUnique<web::WebStateObserverBridge>(
- self.webState, toolbarCoordinator);
+
// Unset the base view controller, so |toolbarCoordinator| doesn't present
// its view controller.
toolbarCoordinator.context.baseViewController = nil;
@@ -78,7 +72,6 @@ const BOOL kUseBottomToolbar = NO;
[self.viewController.presentingViewController
dismissViewControllerAnimated:self.context.animated
completion:nil];
- _webStateObserver.reset();
}
- (BOOL)canAddOverlayCoordinator:(BrowserCoordinator*)overlayCoordinator {
« no previous file with comments | « no previous file | ios/clean/chrome/browser/ui/toolbar/BUILD.gn » ('j') | ios/clean/chrome/browser/ui/toolbar/toolbar_coordinator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698