OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 261 |
262 // Returns the index from which we would go back/forward or reload. This is | 262 // Returns the index from which we would go back/forward or reload. This is |
263 // the last_committed_entry_index_ if pending_entry_index_ is -1. Otherwise, | 263 // the last_committed_entry_index_ if pending_entry_index_ is -1. Otherwise, |
264 // it is the pending_entry_index_. | 264 // it is the pending_entry_index_. |
265 virtual int GetCurrentEntryIndex() const = 0; | 265 virtual int GetCurrentEntryIndex() const = 0; |
266 | 266 |
267 // Returns the last committed entry, which may be null if there are no | 267 // Returns the last committed entry, which may be null if there are no |
268 // committed entries. | 268 // committed entries. |
269 virtual NavigationEntry* GetLastCommittedEntry() const = 0; | 269 virtual NavigationEntry* GetLastCommittedEntry() const = 0; |
270 | 270 |
271 // Returns the index of the last committed entry. | 271 // Returns the index of the last committed entry. It will be -1 if there are |
| 272 // no entries, or if there is a transient entry before the first entry |
| 273 // commits. |
272 virtual int GetLastCommittedEntryIndex() const = 0; | 274 virtual int GetLastCommittedEntryIndex() const = 0; |
273 | 275 |
274 // Returns true if the source for the current entry can be viewed. | 276 // Returns true if the source for the current entry can be viewed. |
275 virtual bool CanViewSource() const = 0; | 277 virtual bool CanViewSource() const = 0; |
276 | 278 |
277 // Navigation list ----------------------------------------------------------- | 279 // Navigation list ----------------------------------------------------------- |
278 | 280 |
279 // Returns the number of entries in the NavigationController, excluding | 281 // Returns the number of entries in the NavigationController, excluding |
280 // the pending entry if there is one, but including the transient entry if | 282 // the pending entry if there is one, but including the transient entry if |
281 // any. | 283 // any. |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 | 457 |
456 private: | 458 private: |
457 // This interface should only be implemented inside content. | 459 // This interface should only be implemented inside content. |
458 friend class NavigationControllerImpl; | 460 friend class NavigationControllerImpl; |
459 NavigationController() {} | 461 NavigationController() {} |
460 }; | 462 }; |
461 | 463 |
462 } // namespace content | 464 } // namespace content |
463 | 465 |
464 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 466 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
OLD | NEW |