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

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

Issue 2718733003: Removed -[CRWWebDelegate webDidUpdateHistoryStateWithPageURL]. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | ios/web/public/test/fakes/crw_test_web_state_observer.h » ('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 e8e4d245ae79eb7ce67ed26d4ce2e50fc2850ba7..8fafe5251deba41b0e1887231bc633ddc42501ff 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -136,6 +136,7 @@
#include "ios/web/public/url_util.h"
#include "ios/web/public/web_client.h"
#import "ios/web/public/web_state/js/crw_js_injection_receiver.h"
+#include "ios/web/public/web_state/navigation_context.h"
#import "ios/web/public/web_state/ui/crw_generic_content_view.h"
#include "ios/web/public/web_state/web_state.h"
#import "ios/web/public/web_state/web_state_observer_bridge.h"
@@ -1364,12 +1365,14 @@ void TabInfoBarObserver::OnInfoBarReplaced(infobars::InfoBar* old_infobar,
[parentTabModel_ notifyTabChanged:self];
}
-- (void)webDidUpdateHistoryStateWithPageURL:(const GURL&)pageUrl {
- favicon::FaviconDriver* faviconDriver =
- favicon::WebFaviconDriver::FromWebState(self.webState);
- if (faviconDriver) {
- // Fetch the favicon for the new URL.
- faviconDriver->FetchFavicon(pageUrl);
+- (void)webState:(web::WebState*)webState
+ didFinishNavigation:(web::NavigationContext*)navigation {
+ if (navigation->IsSamePage()) {
+ auto faviconDriver = favicon::WebFaviconDriver::FromWebState(webState);
+ if (faviconDriver) {
+ // Fetch the favicon for the new URL.
+ faviconDriver->FetchFavicon(navigation->GetUrl());
+ }
}
[parentTabModel_ notifyTabChanged:self];
}
« no previous file with comments | « no previous file | ios/web/public/test/fakes/crw_test_web_state_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698