| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 virtual int GetEntryCount() const = 0; | 284 virtual int GetEntryCount() const = 0; |
| 285 | 285 |
| 286 virtual NavigationEntry* GetEntryAtIndex(int index) const = 0; | 286 virtual NavigationEntry* GetEntryAtIndex(int index) const = 0; |
| 287 | 287 |
| 288 // Returns the entry at the specified offset from current. Returns nullptr | 288 // Returns the entry at the specified offset from current. Returns nullptr |
| 289 // if out of bounds. | 289 // if out of bounds. |
| 290 virtual NavigationEntry* GetEntryAtOffset(int offset) const = 0; | 290 virtual NavigationEntry* GetEntryAtOffset(int offset) const = 0; |
| 291 | 291 |
| 292 // Pending entry ------------------------------------------------------------- | 292 // Pending entry ------------------------------------------------------------- |
| 293 | 293 |
| 294 // Discards the pending and transient entries if any. | 294 // Discards the pending and transient entries if any, and send an appropriate |
| 295 // notification (INVALIDATE_TYPE_URL or INVALIDATE_TYPE_ALL) if they were. |
| 295 virtual void DiscardNonCommittedEntries() = 0; | 296 virtual void DiscardNonCommittedEntries() = 0; |
| 296 | 297 |
| 297 // Returns the pending entry corresponding to the navigation that is | 298 // Returns the pending entry corresponding to the navigation that is |
| 298 // currently in progress, or null if there is none. | 299 // currently in progress, or null if there is none. |
| 299 virtual NavigationEntry* GetPendingEntry() const = 0; | 300 virtual NavigationEntry* GetPendingEntry() const = 0; |
| 300 | 301 |
| 301 // Returns the index of the pending entry or -1 if the pending entry | 302 // Returns the index of the pending entry or -1 if the pending entry |
| 302 // corresponds to a new navigation (created via LoadURL). | 303 // corresponds to a new navigation (created via LoadURL). |
| 303 virtual int GetPendingEntryIndex() const = 0; | 304 virtual int GetPendingEntryIndex() const = 0; |
| 304 | 305 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 | 458 |
| 458 private: | 459 private: |
| 459 // This interface should only be implemented inside content. | 460 // This interface should only be implemented inside content. |
| 460 friend class NavigationControllerImpl; | 461 friend class NavigationControllerImpl; |
| 461 NavigationController() {} | 462 NavigationController() {} |
| 462 }; | 463 }; |
| 463 | 464 |
| 464 } // namespace content | 465 } // namespace content |
| 465 | 466 |
| 466 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 467 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
| OLD | NEW |