| 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 "ios/web/public/browser_url_rewriter.h" | 8 #include "ios/web/public/browser_url_rewriter.h" |
| 9 | 9 |
| 10 namespace web { | 10 namespace web { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 // Removes the transient and pending NavigationItems. | 45 // Removes the transient and pending NavigationItems. |
| 46 virtual void DiscardNonCommittedItems() = 0; | 46 virtual void DiscardNonCommittedItems() = 0; |
| 47 | 47 |
| 48 // Adds |rewriter| to a transient list of URL rewriters. Transient URL | 48 // Adds |rewriter| to a transient list of URL rewriters. Transient URL |
| 49 // rewriters will be executed before the rewriters already added to the | 49 // rewriters will be executed before the rewriters already added to the |
| 50 // BrowserURLRewriter singleton, and the list will be cleared after the next | 50 // BrowserURLRewriter singleton, and the list will be cleared after the next |
| 51 // attempted page load. |rewriter| must not be null. | 51 // attempted page load. |rewriter| must not be null. |
| 52 virtual void AddTransientURLRewriter( | 52 virtual void AddTransientURLRewriter( |
| 53 BrowserURLRewriter::URLRewriter rewriter) = 0; | 53 BrowserURLRewriter::URLRewriter rewriter) = 0; |
| 54 |
| 55 // Returns the number of items in the NavigationManager, excluding |
| 56 // pending and transient entries. |
| 57 virtual int GetEntryCount() const = 0; |
| 58 |
| 59 // Returns the committed NavigationItem at |index|. |
| 60 virtual NavigationItem* GetItemAtIndex(size_t index) const = 0; |
| 61 |
| 62 // Returns the index from which web would go back/forward or reload. |
| 63 virtual int GetCurrentEntryIndex() const = 0; |
| 54 }; | 64 }; |
| 55 | 65 |
| 56 } // namespace web | 66 } // namespace web |
| 57 | 67 |
| 58 #endif // IOS_WEB_PUBLIC_NAVIGATION_MANAGER_H_ | 68 #endif // IOS_WEB_PUBLIC_NAVIGATION_MANAGER_H_ |
| OLD | NEW |