| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 #include "ios/chrome/grit/ios_strings.h" | 121 #include "ios/chrome/grit/ios_strings.h" |
| 122 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" | 122 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
| 123 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_metad
ata.h" | 123 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_metad
ata.h" |
| 124 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_white
list_manager.h" | 124 #import "ios/public/provider/chrome/browser/native_app_launcher/native_app_white
list_manager.h" |
| 125 #import "ios/web/navigation/crw_session_controller.h" | 125 #import "ios/web/navigation/crw_session_controller.h" |
| 126 #import "ios/web/navigation/navigation_item_impl.h" | 126 #import "ios/web/navigation/navigation_item_impl.h" |
| 127 #import "ios/web/navigation/navigation_manager_impl.h" | 127 #import "ios/web/navigation/navigation_manager_impl.h" |
| 128 #include "ios/web/public/favicon_status.h" | 128 #include "ios/web/public/favicon_status.h" |
| 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 #include "ios/web/public/load_committed_details.h" |
| 131 #import "ios/web/public/navigation_manager.h" | 132 #import "ios/web/public/navigation_manager.h" |
| 132 #include "ios/web/public/referrer.h" | 133 #include "ios/web/public/referrer.h" |
| 133 #import "ios/web/public/serializable_user_data_manager.h" | 134 #import "ios/web/public/serializable_user_data_manager.h" |
| 134 #include "ios/web/public/ssl_status.h" | 135 #include "ios/web/public/ssl_status.h" |
| 135 #include "ios/web/public/url_scheme_util.h" | 136 #include "ios/web/public/url_scheme_util.h" |
| 136 #include "ios/web/public/url_util.h" | 137 #include "ios/web/public/url_util.h" |
| 137 #include "ios/web/public/web_client.h" | 138 #include "ios/web/public/web_client.h" |
| 138 #import "ios/web/public/web_state/js/crw_js_injection_receiver.h" | 139 #import "ios/web/public/web_state/js/crw_js_injection_receiver.h" |
| 139 #include "ios/web/public/web_state/navigation_context.h" | 140 #include "ios/web/public/web_state/navigation_context.h" |
| 140 #import "ios/web/public/web_state/ui/crw_generic_content_view.h" | 141 #import "ios/web/public/web_state/ui/crw_generic_content_view.h" |
| (...skipping 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1726 if (faviconDriver) { | 1727 if (faviconDriver) { |
| 1727 faviconDriver->FetchFavicon(lastCommittedURL); | 1728 faviconDriver->FetchFavicon(lastCommittedURL); |
| 1728 } | 1729 } |
| 1729 [parentTabModel_ notifyTabChanged:self]; | 1730 [parentTabModel_ notifyTabChanged:self]; |
| 1730 if (parentTabModel_) { | 1731 if (parentTabModel_) { |
| 1731 [[NSNotificationCenter defaultCenter] | 1732 [[NSNotificationCenter defaultCenter] |
| 1732 postNotificationName:kTabModelTabDidStartLoadingNotification | 1733 postNotificationName:kTabModelTabDidStartLoadingNotification |
| 1733 object:parentTabModel_ | 1734 object:parentTabModel_ |
| 1734 userInfo:@{kTabModelTabKey : self}]; | 1735 userInfo:@{kTabModelTabKey : self}]; |
| 1735 } | 1736 } |
| 1736 [parentTabModel_ navigationCommittedInTab:self]; | 1737 |
| 1738 web::NavigationItem* previousItem = nullptr; |
| 1739 if (details.previous_item_index >= 0) { |
| 1740 previousItem = webState->GetNavigationManager()->GetItemAtIndex( |
| 1741 details.previous_item_index); |
| 1742 } |
| 1743 |
| 1744 [parentTabModel_ navigationCommittedInTab:self previousItem:previousItem]; |
| 1737 | 1745 |
| 1738 // Sending a notification about the url change for crash reporting. | 1746 // Sending a notification about the url change for crash reporting. |
| 1739 // TODO(crbug.com/661675): Consider using the navigation entry committed | 1747 // TODO(crbug.com/661675): Consider using the navigation entry committed |
| 1740 // notification now that it's in the right place. | 1748 // notification now that it's in the right place. |
| 1741 NSString* URLSpec = base::SysUTF8ToNSString(lastCommittedURL.spec()); | 1749 NSString* URLSpec = base::SysUTF8ToNSString(lastCommittedURL.spec()); |
| 1742 if (URLSpec.length) { | 1750 if (URLSpec.length) { |
| 1743 [[NSNotificationCenter defaultCenter] | 1751 [[NSNotificationCenter defaultCenter] |
| 1744 postNotificationName:kTabUrlStartedLoadingNotificationForCrashReporting | 1752 postNotificationName:kTabUrlStartedLoadingNotificationForCrashReporting |
| 1745 object:self | 1753 object:self |
| 1746 userInfo:@{kTabUrlKey : URLSpec}]; | 1754 userInfo:@{kTabUrlKey : URLSpec}]; |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2250 | 2258 |
| 2251 - (TabModel*)parentTabModel { | 2259 - (TabModel*)parentTabModel { |
| 2252 return parentTabModel_; | 2260 return parentTabModel_; |
| 2253 } | 2261 } |
| 2254 | 2262 |
| 2255 - (FormInputAccessoryViewController*)inputAccessoryViewController { | 2263 - (FormInputAccessoryViewController*)inputAccessoryViewController { |
| 2256 return inputAccessoryViewController_.get(); | 2264 return inputAccessoryViewController_.get(); |
| 2257 } | 2265 } |
| 2258 | 2266 |
| 2259 @end | 2267 @end |
| OLD | NEW |