| 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 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1385 DCHECK([self navigationManager]); | 1385 DCHECK([self navigationManager]); |
| 1386 [self navigationManager]->DiscardNonCommittedItems(); | 1386 [self navigationManager]->DiscardNonCommittedItems(); |
| 1387 // Ensure the UI reflects the current entry, not the just-discarded pending | 1387 // Ensure the UI reflects the current entry, not the just-discarded pending |
| 1388 // entry. | 1388 // entry. |
| 1389 [parentTabModel_ notifyTabChanged:self]; | 1389 [parentTabModel_ notifyTabChanged:self]; |
| 1390 return YES; | 1390 return YES; |
| 1391 } | 1391 } |
| 1392 return NO; | 1392 return NO; |
| 1393 } | 1393 } |
| 1394 | 1394 |
| 1395 - (void)webWillFinishHistoryNavigationFromEntry:(CRWSessionEntry*)fromEntry { | |
| 1396 [parentTabModel_ notifyTabChanged:self]; | |
| 1397 } | |
| 1398 | |
| 1399 - (void)webState:(web::WebState*)webState | 1395 - (void)webState:(web::WebState*)webState |
| 1400 didFinishNavigation:(web::NavigationContext*)navigation { | 1396 didFinishNavigation:(web::NavigationContext*)navigation { |
| 1401 if (navigation->IsSamePage()) { | 1397 if (navigation->IsSamePage()) { |
| 1402 auto faviconDriver = favicon::WebFaviconDriver::FromWebState(webState); | 1398 auto faviconDriver = favicon::WebFaviconDriver::FromWebState(webState); |
| 1403 if (faviconDriver) { | 1399 if (faviconDriver) { |
| 1404 // Fetch the favicon for the new URL. | 1400 // Fetch the favicon for the new URL. |
| 1405 faviconDriver->FetchFavicon(navigation->GetUrl()); | 1401 faviconDriver->FetchFavicon(navigation->GetUrl()); |
| 1406 } | 1402 } |
| 1407 } | 1403 } |
| 1408 [parentTabModel_ notifyTabChanged:self]; | 1404 [parentTabModel_ notifyTabChanged:self]; |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2232 | 2228 |
| 2233 - (TabModel*)parentTabModel { | 2229 - (TabModel*)parentTabModel { |
| 2234 return parentTabModel_; | 2230 return parentTabModel_; |
| 2235 } | 2231 } |
| 2236 | 2232 |
| 2237 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2233 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
| 2238 return inputAccessoryViewController_.get(); | 2234 return inputAccessoryViewController_.get(); |
| 2239 } | 2235 } |
| 2240 | 2236 |
| 2241 @end | 2237 @end |
| OLD | NEW |