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

Side by Side Diff: ios/chrome/browser/tabs/tab.mm

Issue 2718733003: Removed -[CRWWebDelegate webDidUpdateHistoryStateWithPageURL]. (Closed)
Patch Set: 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/tabs/tab.h" 5 #import "ios/chrome/browser/tabs/tab.h"
6 6
7 #import <CoreLocation/CoreLocation.h> 7 #import <CoreLocation/CoreLocation.h>
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 #include "ios/web/public/favicon_url.h" 129 #include "ios/web/public/favicon_url.h"
130 #include "ios/web/public/interstitials/web_interstitial.h" 130 #include "ios/web/public/interstitials/web_interstitial.h"
131 #import "ios/web/public/navigation_manager.h" 131 #import "ios/web/public/navigation_manager.h"
132 #include "ios/web/public/referrer.h" 132 #include "ios/web/public/referrer.h"
133 #import "ios/web/public/serializable_user_data_manager.h" 133 #import "ios/web/public/serializable_user_data_manager.h"
134 #include "ios/web/public/ssl_status.h" 134 #include "ios/web/public/ssl_status.h"
135 #include "ios/web/public/url_scheme_util.h" 135 #include "ios/web/public/url_scheme_util.h"
136 #include "ios/web/public/url_util.h" 136 #include "ios/web/public/url_util.h"
137 #include "ios/web/public/web_client.h" 137 #include "ios/web/public/web_client.h"
138 #import "ios/web/public/web_state/js/crw_js_injection_receiver.h" 138 #import "ios/web/public/web_state/js/crw_js_injection_receiver.h"
139 #include "ios/web/public/web_state/navigation_context.h"
139 #import "ios/web/public/web_state/ui/crw_generic_content_view.h" 140 #import "ios/web/public/web_state/ui/crw_generic_content_view.h"
140 #include "ios/web/public/web_state/web_state.h" 141 #include "ios/web/public/web_state/web_state.h"
141 #import "ios/web/public/web_state/web_state_observer_bridge.h" 142 #import "ios/web/public/web_state/web_state_observer_bridge.h"
142 #include "ios/web/public/web_thread.h" 143 #include "ios/web/public/web_thread.h"
143 #import "ios/web/web_state/ui/crw_web_controller.h" 144 #import "ios/web/web_state/ui/crw_web_controller.h"
144 #import "ios/web/web_state/web_state_impl.h" 145 #import "ios/web/web_state/web_state_impl.h"
145 #include "net/base/escape.h" 146 #include "net/base/escape.h"
146 #include "net/base/filename_util.h" 147 #include "net/base/filename_util.h"
147 #import "net/base/mac/url_conversions.h" 148 #import "net/base/mac/url_conversions.h"
148 #include "net/base/net_errors.h" 149 #include "net/base/net_errors.h"
(...skipping 1208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 [parentTabModel_ notifyTabChanged:self]; 1358 [parentTabModel_ notifyTabChanged:self];
1358 return YES; 1359 return YES;
1359 } 1360 }
1360 return NO; 1361 return NO;
1361 } 1362 }
1362 1363
1363 - (void)webWillFinishHistoryNavigationFromEntry:(CRWSessionEntry*)fromEntry { 1364 - (void)webWillFinishHistoryNavigationFromEntry:(CRWSessionEntry*)fromEntry {
1364 [parentTabModel_ notifyTabChanged:self]; 1365 [parentTabModel_ notifyTabChanged:self];
1365 } 1366 }
1366 1367
1367 - (void)webDidUpdateHistoryStateWithPageURL:(const GURL&)pageUrl { 1368 - (void)webState:(web::WebState*)webState
1368 favicon::FaviconDriver* faviconDriver = 1369 didFinishNavigation:(web::NavigationContext*)navigation {
1369 favicon::WebFaviconDriver::FromWebState(self.webState); 1370 if (navigation->IsSamePage()) {
1370 if (faviconDriver) { 1371 auto faviconDriver = favicon::WebFaviconDriver::FromWebState(webState);
1371 // Fetch the favicon for the new URL. 1372 if (faviconDriver) {
1372 faviconDriver->FetchFavicon(pageUrl); 1373 // Fetch the favicon for the new URL.
1374 faviconDriver->FetchFavicon(navigation->GetUrl());
1375 }
1373 } 1376 }
1374 [parentTabModel_ notifyTabChanged:self]; 1377 [parentTabModel_ notifyTabChanged:self];
1375 } 1378 }
1376 1379
1377 // Records the state (scroll position, form values, whatever can be 1380 // Records the state (scroll position, form values, whatever can be
1378 // harvested) from the current page into the current session entry. 1381 // harvested) from the current page into the current session entry.
1379 - (void)recordStateInHistory { 1382 - (void)recordStateInHistory {
1380 // Link-loading prerender tab may not have correct zoom value during the load. 1383 // Link-loading prerender tab may not have correct zoom value during the load.
1381 if (!self.isLinkLoadingPrerenderTab) 1384 if (!self.isLinkLoadingPrerenderTab)
1382 [self.webController recordStateInHistory]; 1385 [self.webController recordStateInHistory];
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
2206 2209
2207 - (TabModel*)parentTabModel { 2210 - (TabModel*)parentTabModel {
2208 return parentTabModel_; 2211 return parentTabModel_;
2209 } 2212 }
2210 2213
2211 - (FormInputAccessoryViewController*)inputAccessoryViewController { 2214 - (FormInputAccessoryViewController*)inputAccessoryViewController {
2212 return inputAccessoryViewController_.get(); 2215 return inputAccessoryViewController_.get();
2213 } 2216 }
2214 2217
2215 @end 2218 @end
OLDNEW
« 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