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

Unified Diff: ios/chrome/browser/tabs/tab.mm

Issue 2741413007: Refactoring Reload in NavigationManager and CRWWebController. (Closed)
Patch Set: Rebase and Remove DCHECK in |loadWithParams| as it has already been taken care of Created 3 years, 9 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/chrome/browser/tabs/tab.h ('k') | ios/chrome/browser/ui/browser_view_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index f48dde0a0e876ba4cf95c28d67233976b07905fb..d1fac84f950b3cc010faddaeee64327f998a0f59 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -1116,12 +1116,6 @@ - (void)loadSessionTab:(const sessions::SessionTab*)sessionTab {
currentIndex:sessionTab->current_navigation_index];
}
-- (void)reload {
- // TODO(crbug.com/661671): Convert callers to go through CRWWebController
- // directly and remove this passthrough method.
- [self.webController reload];
-}
-
- (void)webWillReload {
if ([parentTabModel_ tabUsageRecorder]) {
[parentTabModel_ tabUsageRecorder]->RecordReload(self);
@@ -1418,7 +1412,8 @@ - (void)countMainFrameLoad {
- (void)applicationDidBecomeActive {
if (requireReloadAfterBecomingActive_) {
if (visible_) {
- [self.webController reload];
+ self.navigationManager->Reload(web::ReloadType::NORMAL,
+ false /* check_for_repost */);
} else {
[self.webController requirePageReload];
}
@@ -1953,7 +1948,11 @@ - (void)renderProcessGoneForWebState:(web::WebState*)webState {
base::scoped_nsobject<SadTabView> sadTabView(
[[SadTabView alloc] initWithReloadHandler:^{
base::scoped_nsobject<Tab> strongSelf([weakSelf retain]);
- [strongSelf reload];
+
+ // |check_for_repost| is true because this is called from SadTab and
+ // explicitly initiated by the user.
+ [strongSelf navigationManager]->Reload(web::ReloadType::NORMAL,
+ true /* check_for_repost */);
}]);
base::scoped_nsobject<CRWContentView> contentView(
[[CRWGenericContentView alloc] initWithView:sadTabView]);
« no previous file with comments | « ios/chrome/browser/tabs/tab.h ('k') | ios/chrome/browser/ui/browser_view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698