OLD | NEW |
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 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 DCHECK([self navigationManager]); | 1312 DCHECK([self navigationManager]); |
1313 [self navigationManager]->DiscardNonCommittedItems(); | 1313 [self navigationManager]->DiscardNonCommittedItems(); |
1314 // Ensure the UI reflects the current entry, not the just-discarded pending | 1314 // Ensure the UI reflects the current entry, not the just-discarded pending |
1315 // entry. | 1315 // entry. |
1316 [parentTabModel_ notifyTabChanged:self]; | 1316 [parentTabModel_ notifyTabChanged:self]; |
1317 return YES; | 1317 return YES; |
1318 } | 1318 } |
1319 return NO; | 1319 return NO; |
1320 } | 1320 } |
1321 | 1321 |
1322 - (void)webWillFinishHistoryNavigation { | |
1323 [parentTabModel_ notifyTabChanged:self]; | |
1324 } | |
1325 | |
1326 - (void)webState:(web::WebState*)webState | 1322 - (void)webState:(web::WebState*)webState |
1327 didFinishNavigation:(web::NavigationContext*)navigation { | 1323 didFinishNavigation:(web::NavigationContext*)navigation { |
1328 if (navigation->IsSameDocument()) { | 1324 if (navigation->IsSameDocument()) { |
1329 auto* faviconDriver = favicon::WebFaviconDriver::FromWebState(webState); | 1325 auto* faviconDriver = favicon::WebFaviconDriver::FromWebState(webState); |
1330 if (faviconDriver) { | 1326 if (faviconDriver) { |
1331 // Fetch the favicon for the new URL. | 1327 // Fetch the favicon for the new URL. |
1332 faviconDriver->FetchFavicon(navigation->GetUrl()); | 1328 faviconDriver->FetchFavicon(navigation->GetUrl()); |
1333 } | 1329 } |
1334 } | 1330 } |
1335 | 1331 |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2104 | 2100 |
2105 - (TabModel*)parentTabModel { | 2101 - (TabModel*)parentTabModel { |
2106 return parentTabModel_; | 2102 return parentTabModel_; |
2107 } | 2103 } |
2108 | 2104 |
2109 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2105 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
2110 return inputAccessoryViewController_.get(); | 2106 return inputAccessoryViewController_.get(); |
2111 } | 2107 } |
2112 | 2108 |
2113 @end | 2109 @end |
OLD | NEW |