Commit 3cb094bc authored by mrefaat's avatar mrefaat Committed by Commit Bot

[IOSTabRefactoring] Replace tab.view by webState.GetView()

This CL to prepare for removing -view method from Tab

Bug: 899832
Change-Id: Iebe22114e1b478bb41e418e66c5ba5b85109166e
Reviewed-on: https://chromium-review.googlesource.com/c/1318178Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Mohammad Refaat <mrefaat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605437}
parent d0734458
...@@ -420,7 +420,11 @@ NSString* const kTabUrlKey = @"url"; ...@@ -420,7 +420,11 @@ NSString* const kTabUrlKey = @"url";
_openInController = [[OpenInController alloc] _openInController = [[OpenInController alloc]
initWithURLLoaderFactory:_browserState->GetSharedURLLoaderFactory() initWithURLLoaderFactory:_browserState->GetSharedURLLoaderFactory()
webController:self.webController]; webController:self.webController];
_openInController.baseView = self.view; // If the tab was evicted before, It should have been loaded already before
// starting the open-in controller.
DCHECK(!self.webState->IsEvicted());
self.webState->GetNavigationManager()->LoadIfNecessary();
_openInController.baseView = self.webState->GetView();
} }
return _openInController; return _openInController;
} }
......
...@@ -200,6 +200,7 @@ class TabTest : public BlockCleanupTest, ...@@ -200,6 +200,7 @@ class TabTest : public BlockCleanupTest,
OCMStub([mock_web_controller_ webViewNavigationProxy]) OCMStub([mock_web_controller_ webViewNavigationProxy])
.andReturn(mock_web_view_); .andReturn(mock_web_view_);
} }
OCMStub([mock_web_controller_ isViewAlive]).andReturn(YES);
web::WebState::CreateParams create_params(browser_state); web::WebState::CreateParams create_params(browser_state);
web_state_impl_ = std::make_unique<web::WebStateImpl>(create_params); web_state_impl_ = std::make_unique<web::WebStateImpl>(create_params);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment