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

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

Issue 2741413007: Refactoring Reload in NavigationManager and CRWWebController. (Closed)
Patch Set: Remove unused methods in navigation manager delegate 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
Index: ios/chrome/browser/tabs/tab.mm
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index 6627920e9cbf37542a887b480a8e354fde20375c..a71e9cc4b144f4694f64436696522a36611a7fb0 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -1165,12 +1165,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);
@@ -1465,7 +1459,8 @@ - (void)countMainFrameLoad {
- (void)applicationDidBecomeActive {
if (requireReloadAfterBecomingActive_) {
if (visible_) {
- [self.webController reload];
+ self.navigationManager->Reload(web::ReloadType::NORMAL,
+ true /* check_for_repost */);
Eugene But (OOO till 7-30) 2017/03/15 17:53:32 ditto
liaoyuke 2017/03/16 16:22:19 Done.
} else {
[self.webController requirePageReload];
}
@@ -2004,7 +1999,8 @@ - (void)renderProcessGoneForWebState:(web::WebState*)webState {
base::scoped_nsobject<SadTabView> sadTabView(
[[SadTabView alloc] initWithReloadHandler:^{
base::scoped_nsobject<Tab> strongSelf([weakSelf retain]);
- [strongSelf reload];
+ [strongSelf navigationManager]->Reload(web::ReloadType::NORMAL,
Eugene But (OOO till 7-30) 2017/03/15 17:53:32 ditto
liaoyuke 2017/03/16 16:22:19 Done.
+ true /* check_for_repost */);
}]);
base::scoped_nsobject<CRWContentView> contentView(
[[CRWGenericContentView alloc] initWithView:sadTabView]);

Powered by Google App Engine
This is Rietveld 408576698