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

Side by Side Diff: ios/web/public/navigation_manager.h

Issue 2766063002: Remove the concept of currentItemIndex (Closed)
Patch Set: fix unit tests 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
OLDNEW
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 BrowserURLRewriter::URLRewriter rewriter) = 0; 113 BrowserURLRewriter::URLRewriter rewriter) = 0;
114 114
115 // Returns the number of items in the NavigationManager, excluding 115 // Returns the number of items in the NavigationManager, excluding
116 // pending and transient entries. 116 // pending and transient entries.
117 // TODO(crbug.com/533848): Update to return size_t. 117 // TODO(crbug.com/533848): Update to return size_t.
118 virtual int GetItemCount() const = 0; 118 virtual int GetItemCount() const = 0;
119 119
120 // Returns the committed NavigationItem at |index|. 120 // Returns the committed NavigationItem at |index|.
121 virtual NavigationItem* GetItemAtIndex(size_t index) const = 0; 121 virtual NavigationItem* GetItemAtIndex(size_t index) const = 0;
122 122
123 // Returns the index from which web would go back/forward or reload.
124 // TODO(crbug.com/533848): Update to return size_t.
125 virtual int GetCurrentItemIndex() const = 0;
126
127 // Returns the index of the last committed item or -1 if the last 123 // Returns the index of the last committed item or -1 if the last
128 // committed item correspond to a new navigation. 124 // committed item correspond to a new navigation.
129 // TODO(crbug.com/533848): Update to return size_t. 125 // TODO(crbug.com/533848): Update to return size_t.
130 virtual int GetLastCommittedItemIndex() const = 0; 126 virtual int GetLastCommittedItemIndex() const = 0;
131 127
132 // Returns the index of the pending item or -1 if the pending item 128 // Returns the index of the pending item or -1 if the pending item
133 // corresponds to a new navigation. 129 // corresponds to a new navigation.
134 // TODO(crbug.com/533848): Update to return size_t. 130 // TODO(crbug.com/533848): Update to return size_t.
135 virtual int GetPendingItemIndex() const = 0; 131 virtual int GetPendingItemIndex() const = 0;
136 132
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // Forces the pending item to be loaded using desktop user agent. Note that 185 // Forces the pending item to be loaded using desktop user agent. Note that
190 // the pending item may or may not already exist. 186 // the pending item may or may not already exist.
191 // TODO(crbug.com/692303): Remove this when overriding the user agent doesn't 187 // TODO(crbug.com/692303): Remove this when overriding the user agent doesn't
192 // create a new NavigationItem. 188 // create a new NavigationItem.
193 virtual void OverrideDesktopUserAgentForNextPendingItem() = 0; 189 virtual void OverrideDesktopUserAgentForNextPendingItem() = 0;
194 }; 190 };
195 191
196 } // namespace web 192 } // namespace web
197 193
198 #endif // IOS_WEB_PUBLIC_NAVIGATION_MANAGER_H_ 194 #endif // IOS_WEB_PUBLIC_NAVIGATION_MANAGER_H_
OLDNEW
« no previous file with comments | « ios/web/public/crw_session_storage.mm ('k') | ios/web/public/test/fakes/test_navigation_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698