| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 #import "ios/chrome/browser/geolocation/omnibox_geolocation_controller.h" | 61 #import "ios/chrome/browser/geolocation/omnibox_geolocation_controller.h" |
| 62 #include "ios/chrome/browser/history/history_service_factory.h" | 62 #include "ios/chrome/browser/history/history_service_factory.h" |
| 63 #include "ios/chrome/browser/history/top_sites_factory.h" | 63 #include "ios/chrome/browser/history/top_sites_factory.h" |
| 64 #include "ios/chrome/browser/infobars/infobar_manager_impl.h" | 64 #include "ios/chrome/browser/infobars/infobar_manager_impl.h" |
| 65 #include "ios/chrome/browser/metrics/ios_chrome_origins_seen_service_factory.h" | 65 #include "ios/chrome/browser/metrics/ios_chrome_origins_seen_service_factory.h" |
| 66 #import "ios/chrome/browser/metrics/tab_usage_recorder.h" | 66 #import "ios/chrome/browser/metrics/tab_usage_recorder.h" |
| 67 #import "ios/chrome/browser/native_app_launcher/native_app_navigation_controller
.h" | 67 #import "ios/chrome/browser/native_app_launcher/native_app_navigation_controller
.h" |
| 68 #import "ios/chrome/browser/passwords/password_controller.h" | 68 #import "ios/chrome/browser/passwords/password_controller.h" |
| 69 #import "ios/chrome/browser/passwords/passwords_ui_delegate_impl.h" | 69 #import "ios/chrome/browser/passwords/passwords_ui_delegate_impl.h" |
| 70 #include "ios/chrome/browser/pref_names.h" | 70 #include "ios/chrome/browser/pref_names.h" |
| 71 #include "ios/chrome/browser/reading_list/reading_list_model_factory.h" |
| 72 #import "ios/chrome/browser/reading_list/reading_list_web_state_observer.h" |
| 71 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" | 73 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" |
| 72 #include "ios/chrome/browser/sessions/ios_chrome_session_tab_helper.h" | 74 #include "ios/chrome/browser/sessions/ios_chrome_session_tab_helper.h" |
| 73 #include "ios/chrome/browser/signin/account_consistency_service_factory.h" | 75 #include "ios/chrome/browser/signin/account_consistency_service_factory.h" |
| 74 #include "ios/chrome/browser/signin/account_reconcilor_factory.h" | 76 #include "ios/chrome/browser/signin/account_reconcilor_factory.h" |
| 75 #include "ios/chrome/browser/signin/authentication_service.h" | 77 #include "ios/chrome/browser/signin/authentication_service.h" |
| 76 #include "ios/chrome/browser/signin/authentication_service_factory.h" | 78 #include "ios/chrome/browser/signin/authentication_service_factory.h" |
| 77 #include "ios/chrome/browser/signin/signin_capability.h" | 79 #include "ios/chrome/browser/signin/signin_capability.h" |
| 78 #import "ios/chrome/browser/snapshots/snapshot_manager.h" | 80 #import "ios/chrome/browser/snapshots/snapshot_manager.h" |
| 79 #import "ios/chrome/browser/snapshots/snapshot_overlay_provider.h" | 81 #import "ios/chrome/browser/snapshots/snapshot_overlay_provider.h" |
| 80 #import "ios/chrome/browser/snapshots/web_controller_snapshot_helper.h" | 82 #import "ios/chrome/browser/snapshots/web_controller_snapshot_helper.h" |
| (...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 DCHECK([self navigationManager]); | 1311 DCHECK([self navigationManager]); |
| 1310 [self navigationManager]->DiscardNonCommittedItems(); | 1312 [self navigationManager]->DiscardNonCommittedItems(); |
| 1311 // Ensure the UI reflects the current entry, not the just-discarded pending | 1313 // Ensure the UI reflects the current entry, not the just-discarded pending |
| 1312 // entry. | 1314 // entry. |
| 1313 [parentTabModel_ notifyTabChanged:self]; | 1315 [parentTabModel_ notifyTabChanged:self]; |
| 1314 return YES; | 1316 return YES; |
| 1315 } | 1317 } |
| 1316 return NO; | 1318 return NO; |
| 1317 } | 1319 } |
| 1318 | 1320 |
| 1321 - (void)currentNavigationWillContinueInExternalApp { |
| 1322 ReadingListModel* model = |
| 1323 ReadingListModelFactory::GetForBrowserState(browserState_); |
| 1324 ReadingListWebStateObserver::FromWebState(webStateImpl_.get(), model) |
| 1325 ->CurrentNavigationWillContinueInExternalApp(); |
| 1326 } |
| 1327 |
| 1319 - (void)webState:(web::WebState*)webState | 1328 - (void)webState:(web::WebState*)webState |
| 1320 didFinishNavigation:(web::NavigationContext*)navigation { | 1329 didFinishNavigation:(web::NavigationContext*)navigation { |
| 1321 if (navigation->IsSameDocument()) { | 1330 if (navigation->IsSameDocument()) { |
| 1322 auto* faviconDriver = favicon::WebFaviconDriver::FromWebState(webState); | 1331 auto* faviconDriver = favicon::WebFaviconDriver::FromWebState(webState); |
| 1323 if (faviconDriver) { | 1332 if (faviconDriver) { |
| 1324 // Fetch the favicon for the new URL. | 1333 // Fetch the favicon for the new URL. |
| 1325 faviconDriver->FetchFavicon(navigation->GetUrl()); | 1334 faviconDriver->FetchFavicon(navigation->GetUrl()); |
| 1326 } | 1335 } |
| 1327 } | 1336 } |
| 1328 | 1337 |
| (...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2087 | 2096 |
| 2088 - (TabModel*)parentTabModel { | 2097 - (TabModel*)parentTabModel { |
| 2089 return parentTabModel_; | 2098 return parentTabModel_; |
| 2090 } | 2099 } |
| 2091 | 2100 |
| 2092 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2101 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
| 2093 return inputAccessoryViewController_.get(); | 2102 return inputAccessoryViewController_.get(); |
| 2094 } | 2103 } |
| 2095 | 2104 |
| 2096 @end | 2105 @end |
| OLD | NEW |