| 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 CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 // preparation to add another. | 338 // preparation to add another. |
| 339 void PruneOldestEntryIfFull(); | 339 void PruneOldestEntryIfFull(); |
| 340 | 340 |
| 341 // Removes all entries except the last committed entry. If there is a new | 341 // Removes all entries except the last committed entry. If there is a new |
| 342 // pending navigation it is preserved. In contrast to | 342 // pending navigation it is preserved. In contrast to |
| 343 // PruneAllButLastCommitted() this does not update the session history of the | 343 // PruneAllButLastCommitted() this does not update the session history of the |
| 344 // RenderView. Callers must ensure that |CanPruneAllButLastCommitted| returns | 344 // RenderView. Callers must ensure that |CanPruneAllButLastCommitted| returns |
| 345 // true before calling this. | 345 // true before calling this. |
| 346 void PruneAllButLastCommittedInternal(); | 346 void PruneAllButLastCommittedInternal(); |
| 347 | 347 |
| 348 // Returns true if the navigation is likley to be automatic rather than | |
| 349 // user-initiated. | |
| 350 bool IsLikelyAutoNavigation(base::TimeTicks now); | |
| 351 | |
| 352 // Inserts up to |max_index| entries from |source| into this. This does NOT | 348 // Inserts up to |max_index| entries from |source| into this. This does NOT |
| 353 // adjust any of the members that reference entries_ | 349 // adjust any of the members that reference entries_ |
| 354 // (last_committed_entry_index_, pending_entry_index_ or | 350 // (last_committed_entry_index_, pending_entry_index_ or |
| 355 // transient_entry_index_). | 351 // transient_entry_index_). |
| 356 void InsertEntriesFrom(const NavigationControllerImpl& source, int max_index); | 352 void InsertEntriesFrom(const NavigationControllerImpl& source, int max_index); |
| 357 | 353 |
| 358 // Returns the navigation index that differs from the current entry by the | 354 // Returns the navigation index that differs from the current entry by the |
| 359 // specified |offset|. The index returned is not guaranteed to be valid. | 355 // specified |offset|. The index returned is not guaranteed to be valid. |
| 360 int GetIndexForOffset(int offset) const; | 356 int GetIndexForOffset(int offset) const; |
| 361 | 357 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 TimeSmoother time_smoother_; | 445 TimeSmoother time_smoother_; |
| 450 | 446 |
| 451 std::unique_ptr<NavigationEntryScreenshotManager> screenshot_manager_; | 447 std::unique_ptr<NavigationEntryScreenshotManager> screenshot_manager_; |
| 452 | 448 |
| 453 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); | 449 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); |
| 454 }; | 450 }; |
| 455 | 451 |
| 456 } // namespace content | 452 } // namespace content |
| 457 | 453 |
| 458 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ | 454 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ |
| OLD | NEW |