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

Unified Diff: ios/web/navigation/navigation_manager_impl.mm

Issue 2671773005: Updated CRWSessionController interface to use NavigationItems. (Closed)
Patch Set: todo, unscoped => raw Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ios/web/navigation/navigation_manager_impl.mm
diff --git a/ios/web/navigation/navigation_manager_impl.mm b/ios/web/navigation/navigation_manager_impl.mm
index 372d8a0db5510cd30469c76609ab085bdf5be775..0f5b9dcde986b4b5fd71f19123af50fb06aa786f 100644
--- a/ios/web/navigation/navigation_manager_impl.mm
+++ b/ios/web/navigation/navigation_manager_impl.mm
@@ -223,7 +223,7 @@ bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) {
}
void NavigationManagerImpl::DiscardNonCommittedItems() {
- [session_controller_ discardNonCommittedEntries];
+ [session_controller_ discardNonCommittedItems];
}
void NavigationManagerImpl::LoadIfNecessary() {
@@ -259,9 +259,9 @@ bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) {
}
int NavigationManagerImpl::GetPendingItemIndex() const {
- if ([session_controller_ hasPendingEntry]) {
- if ([session_controller_ pendingEntryIndex] != -1) {
- return [session_controller_ pendingEntryIndex];
+ if ([session_controller_ pendingEntry]) {
+ if ([session_controller_ pendingItemIndex] != -1) {
+ return [session_controller_ pendingItemIndex];
}
// TODO(crbug.com/665189): understand why current item index is
// returned here.
@@ -285,7 +285,7 @@ bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) {
if (idx >= entries.count)
return false;
- [session_controller_ removeEntryAtIndex:index];
+ [session_controller_ removeItemAtIndex:index];
return true;
}
@@ -342,12 +342,12 @@ bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) {
}
int NavigationManagerImpl::GetIndexForOffset(int offset) const {
- int result = [session_controller_ pendingEntryIndex] == -1
+ int result = [session_controller_ pendingItemIndex] == -1
? GetCurrentItemIndex()
- : static_cast<int>([session_controller_ pendingEntryIndex]);
+ : static_cast<int>([session_controller_ pendingItemIndex]);
if (offset < 0) {
- if (GetTransientItem() && [session_controller_ pendingEntryIndex] == -1) {
+ if (GetTransientItem() && [session_controller_ pendingItemIndex] == -1) {
// Going back from transient item that added to the end navigation stack
// is a matter of discarding it as there is no need to move navigation
// index back.
@@ -371,7 +371,7 @@ bool AreURLsInPageNavigation(const GURL& existing_url, const GURL& new_url) {
if (result > GetItemCount() /* overflow */)
result = INT_MIN;
} else if (offset > 0) {
- if (GetPendingItem() && [session_controller_ pendingEntryIndex] == -1) {
+ if (GetPendingItem() && [session_controller_ pendingItemIndex] == -1) {
// Chrome for iOS does not allow forward navigation if there is another
// pending navigation in progress. Returning invalid index indicates that
// forward navigation will not be allowed (and |INT_MAX| works for that).
« no previous file with comments | « ios/web/navigation/navigation_item_impl_list.mm ('k') | ios/web/navigation/navigation_manager_impl_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698