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

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

Issue 2491773005: [ios] Removed canGoBack/canGoForward API from CRWSessionController. (Closed)
Patch Set: Fixed compilation. Created 4 years, 1 month 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 aed46fa3027e0f7b4088362593746ff01dc5f187..d5cba31cb1a5f9c0de9e0a02196dd3c1bd6cb212 100644
--- a/ios/web/navigation/navigation_manager_impl.mm
+++ b/ios/web/navigation/navigation_manager_impl.mm
@@ -287,11 +287,15 @@ bool NavigationManagerImpl::RemoveItemAtIndex(int index) {
}
bool NavigationManagerImpl::CanGoBack() const {
- return [session_controller_ canGoBack];
+ return CanGoToOffset(-1);
}
bool NavigationManagerImpl::CanGoForward() const {
- return [session_controller_ canGoForward];
+ return CanGoToOffset(1);
+}
+
+bool NavigationManagerImpl::CanGoToOffset(int offset) const {
+ return [session_controller_ canGoDelta:offset];
}
void NavigationManagerImpl::GoBack() {
« no previous file with comments | « ios/web/navigation/navigation_manager_impl.h ('k') | ios/web/navigation/navigation_manager_impl_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698