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

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

Issue 2643493002: Added -[Tab webState:didCommitNavigationWithDetails:]. (Closed)
Patch Set: Cleaned up tests Created 3 years, 11 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 | « no previous file | ios/chrome/browser/tabs/tab_unittest.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 db9e457ccfcf1faff648d8faf70497230d8c6cbd..3458abf02a752fc05688e1fe6f1aa4dab3ba510a 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -1784,17 +1784,15 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
[parentTabModel_ notifyTabChanged:self];
}
-// Called when the page URL has changed.
-- (void)webDidStartLoadingURL:(const GURL&)currentUrl
- shouldUpdateHistory:(BOOL)updateHistory {
- DCHECK(self.webController.loadPhase == web::PAGE_LOADING);
+- (void)webState:(web::WebState*)webState
+ didCommitNavigationWithDetails:(const web::LoadCommittedDetails&)details {
DCHECK([self navigationManager]);
- // |webWillStartLoading:| is not called for native page loads.
+ // |webWillAddPendingURL:transition:| is not called for native page loads.
// TODO(crbug.com/381201): Move this call there once that bug is fixed so that
// |disableFullScreen| is called only from one place.
[fullScreenController_ disableFullScreen];
[findInPageController_ disableFindInPageWithCompletionHandler:nil];
- [autoReloadBridge_ loadStartedForURL:currentUrl];
+ [autoReloadBridge_ loadStartedForURL:webState->GetLastCommittedURL()];
if (isUserNavigationEvent_) {
[[NSNotificationCenter defaultCenter]
@@ -1805,26 +1803,26 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
[[NSNotificationCenter defaultCenter]
postNotificationName:kTabModelTabWillStartLoadingNotification
object:parentTabModel_
- userInfo:[NSDictionary
- dictionaryWithObject:self
- forKey:kTabModelTabKey]];
+ userInfo:@{kTabModelTabKey : self}];
}
favicon::FaviconDriver* faviconDriver =
- favicon::WebFaviconDriver::FromWebState(self.webState);
+ favicon::WebFaviconDriver::FromWebState(webState);
if (faviconDriver) {
- faviconDriver->FetchFavicon(currentUrl);
+ faviconDriver->FetchFavicon(webState->GetLastCommittedURL());
}
[parentTabModel_ notifyTabChanged:self];
if (parentTabModel_) {
[[NSNotificationCenter defaultCenter]
postNotificationName:kTabModelTabDidStartLoadingNotification
object:parentTabModel_
- userInfo:[NSDictionary
- dictionaryWithObject:self
- forKey:kTabModelTabKey]];
+ userInfo:@{kTabModelTabKey : self}];
}
-
[parentTabModel_ navigationCommittedInTab:self];
+}
+
+// Called when the page URL has changed.
+- (void)webDidStartLoadingURL:(const GURL&)currentUrl
+ shouldUpdateHistory:(BOOL)updateHistory {
if (updateHistory) {
[self addCurrentEntryToHistoryDB];
[self countMainFrameLoad];
« no previous file with comments | « no previous file | ios/chrome/browser/tabs/tab_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698