| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef IOS_WEB_PUBLIC_NAVIGATION_MANAGER_H_ | 5 #ifndef IOS_WEB_PUBLIC_NAVIGATION_MANAGER_H_ |
| 6 #define IOS_WEB_PUBLIC_NAVIGATION_MANAGER_H_ | 6 #define IOS_WEB_PUBLIC_NAVIGATION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #import "base/mac/scoped_nsobject.h" | 10 #import "base/mac/scoped_nsobject.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 BrowserURLRewriter::URLRewriter rewriter) = 0; | 123 BrowserURLRewriter::URLRewriter rewriter) = 0; |
| 124 | 124 |
| 125 // Returns the number of items in the NavigationManager, excluding | 125 // Returns the number of items in the NavigationManager, excluding |
| 126 // pending and transient entries. | 126 // pending and transient entries. |
| 127 // TODO(crbug.com/533848): Update to return size_t. | 127 // TODO(crbug.com/533848): Update to return size_t. |
| 128 virtual int GetItemCount() const = 0; | 128 virtual int GetItemCount() const = 0; |
| 129 | 129 |
| 130 // Returns the committed NavigationItem at |index|. | 130 // Returns the committed NavigationItem at |index|. |
| 131 virtual NavigationItem* GetItemAtIndex(size_t index) const = 0; | 131 virtual NavigationItem* GetItemAtIndex(size_t index) const = 0; |
| 132 | 132 |
| 133 // Returns the index of |item| in the committed session history. |
| 134 virtual int GetIndexOfItem(const NavigationItem* item) const = 0; |
| 135 |
| 133 // Returns the index of the last committed item or -1 if the last | 136 // Returns the index of the last committed item or -1 if the last |
| 134 // committed item correspond to a new navigation. | 137 // committed item correspond to a new navigation. |
| 135 // TODO(crbug.com/533848): Update to return size_t. | 138 // TODO(crbug.com/533848): Update to return size_t. |
| 136 virtual int GetLastCommittedItemIndex() const = 0; | 139 virtual int GetLastCommittedItemIndex() const = 0; |
| 137 | 140 |
| 138 // Returns the index of the pending item or -1 if the pending item | 141 // Returns the index of the pending item or -1 if the pending item |
| 139 // corresponds to a new navigation. | 142 // corresponds to a new navigation. |
| 140 // TODO(crbug.com/533848): Update to return size_t. | 143 // TODO(crbug.com/533848): Update to return size_t. |
| 141 virtual int GetPendingItemIndex() const = 0; | 144 virtual int GetPendingItemIndex() const = 0; |
| 142 | 145 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // This is true when all the following conditions are met: | 190 // This is true when all the following conditions are met: |
| 188 // - There is a last committed NavigationItem. | 191 // - There is a last committed NavigationItem. |
| 189 // - There is no pending history navigation. | 192 // - There is no pending history navigation. |
| 190 // - There is no transient NavigationItem. | 193 // - There is no transient NavigationItem. |
| 191 virtual bool CanPruneAllButLastCommittedItem() const = 0; | 194 virtual bool CanPruneAllButLastCommittedItem() const = 0; |
| 192 }; | 195 }; |
| 193 | 196 |
| 194 } // namespace web | 197 } // namespace web |
| 195 | 198 |
| 196 #endif // IOS_WEB_PUBLIC_NAVIGATION_MANAGER_H_ | 199 #endif // IOS_WEB_PUBLIC_NAVIGATION_MANAGER_H_ |
| OLD | NEW |