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

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

Issue 2724073005: Remove NavigationManager::GetPreviousItem(). (Closed)
Patch Set: Address comments. 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/chrome/browser/tabs/tab_model.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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after
1703 if (faviconDriver) { 1704 if (faviconDriver) {
1704 faviconDriver->FetchFavicon(lastCommittedURL); 1705 faviconDriver->FetchFavicon(lastCommittedURL);
1705 } 1706 }
1706 [parentTabModel_ notifyTabChanged:self]; 1707 [parentTabModel_ notifyTabChanged:self];
1707 if (parentTabModel_) { 1708 if (parentTabModel_) {
1708 [[NSNotificationCenter defaultCenter] 1709 [[NSNotificationCenter defaultCenter]
1709 postNotificationName:kTabModelTabDidStartLoadingNotification 1710 postNotificationName:kTabModelTabDidStartLoadingNotification
1710 object:parentTabModel_ 1711 object:parentTabModel_
1711 userInfo:@{kTabModelTabKey : self}]; 1712 userInfo:@{kTabModelTabKey : self}];
1712 } 1713 }
1713 [parentTabModel_ navigationCommittedInTab:self]; 1714
1715 web::NavigationItem* previousItem = nullptr;
1716 if (details.previous_item_index >= 0) {
1717 previousItem = webState->GetNavigationManager()->GetItemAtIndex(
1718 details.previous_item_index);
1719 }
1720
1721 [parentTabModel_ navigationCommittedInTab:self previousItem:previousItem];
1714 1722
1715 // Sending a notification about the url change for crash reporting. 1723 // Sending a notification about the url change for crash reporting.
1716 // TODO(crbug.com/661675): Consider using the navigation entry committed 1724 // TODO(crbug.com/661675): Consider using the navigation entry committed
1717 // notification now that it's in the right place. 1725 // notification now that it's in the right place.
1718 NSString* URLSpec = base::SysUTF8ToNSString(lastCommittedURL.spec()); 1726 NSString* URLSpec = base::SysUTF8ToNSString(lastCommittedURL.spec());
1719 if (URLSpec.length) { 1727 if (URLSpec.length) {
1720 [[NSNotificationCenter defaultCenter] 1728 [[NSNotificationCenter defaultCenter]
1721 postNotificationName:kTabUrlStartedLoadingNotificationForCrashReporting 1729 postNotificationName:kTabUrlStartedLoadingNotificationForCrashReporting
1722 object:self 1730 object:self
1723 userInfo:@{kTabUrlKey : URLSpec}]; 1731 userInfo:@{kTabUrlKey : URLSpec}];
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 2233
2226 - (TabModel*)parentTabModel { 2234 - (TabModel*)parentTabModel {
2227 return parentTabModel_; 2235 return parentTabModel_;
2228 } 2236 }
2229 2237
2230 - (FormInputAccessoryViewController*)inputAccessoryViewController { 2238 - (FormInputAccessoryViewController*)inputAccessoryViewController {
2231 return inputAccessoryViewController_.get(); 2239 return inputAccessoryViewController_.get();
2232 } 2240 }
2233 2241
2234 @end 2242 @end
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/tabs/tab_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698