| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 // A variant of CopyStateFrom. Removes all entries from this except the last | 365 // A variant of CopyStateFrom. Removes all entries from this except the last |
| 366 // entry, inserts all entries from |source| before and including the active | 366 // entry, inserts all entries from |source| before and including the active |
| 367 // entry and resets the |session_id_| of this to match |source|. This is | 367 // entry and resets the |session_id_| of this to match |source|. This is |
| 368 // intended for use when you're going to throw away |source| and replace it | 368 // intended for use when you're going to throw away |source| and replace it |
| 369 // with this. This method is intended for use when the last entry of |this| | 369 // with this. This method is intended for use when the last entry of |this| |
| 370 // is the active entry. For example: | 370 // is the active entry. For example: |
| 371 // source: A B *C* D | 371 // source: A B *C* D |
| 372 // this: E F *G* (last must be active or pending) | 372 // this: E F *G* (last must be active or pending) |
| 373 // result: A B *G* | 373 // result: A B *G* |
| 374 // This ignores the transient index of the source and honors that of 'this'. | 374 // This ignores the transient index of the source and honors that of 'this'. |
| 375 // This should only be used when you are going to destroy |source| right after | |
| 376 // invoking this. | |
| 377 void CopyStateFromAndPrune(NavigationController* source); | 375 void CopyStateFromAndPrune(NavigationController* source); |
| 378 | 376 |
| 379 // Removes all the entries except the active entry. If there is a new pending | 377 // Removes all the entries except the active entry. If there is a new pending |
| 380 // navigation it is preserved. | 378 // navigation it is preserved. |
| 381 void PruneAllButActive(); | 379 void PruneAllButActive(); |
| 382 | 380 |
| 383 // Random data --------------------------------------------------------------- | 381 // Random data --------------------------------------------------------------- |
| 384 | 382 |
| 385 // Returns the identifier used by session restore. | 383 // Returns the identifier used by session restore. |
| 386 const SessionID& session_id() const { return session_id_; } | 384 const SessionID& session_id() const { return session_id_; } |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 static size_t max_entry_count_; | 596 static size_t max_entry_count_; |
| 599 | 597 |
| 600 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), | 598 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), |
| 601 // NO_RELOAD otherwise. | 599 // NO_RELOAD otherwise. |
| 602 ReloadType pending_reload_; | 600 ReloadType pending_reload_; |
| 603 | 601 |
| 604 DISALLOW_COPY_AND_ASSIGN(NavigationController); | 602 DISALLOW_COPY_AND_ASSIGN(NavigationController); |
| 605 }; | 603 }; |
| 606 | 604 |
| 607 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ | 605 #endif // CHROME_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_H_ |
| OLD | NEW |