| 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 "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 // If we have the maximum number of entries, remove the oldest one in | 299 // If we have the maximum number of entries, remove the oldest one in |
| 300 // preparation to add another. | 300 // preparation to add another. |
| 301 void PruneOldestEntryIfFull(); | 301 void PruneOldestEntryIfFull(); |
| 302 | 302 |
| 303 // Removes all entries except the last committed entry. If there is a new | 303 // Removes all entries except the last committed entry. If there is a new |
| 304 // pending navigation it is preserved. In contrast to PruneAllButVisible() | 304 // pending navigation it is preserved. In contrast to PruneAllButVisible() |
| 305 // this does not update the session history of the RenderView. Callers | 305 // this does not update the session history of the RenderView. Callers |
| 306 // must ensure that |CanPruneAllButVisible| returns true before calling this. | 306 // must ensure that |CanPruneAllButVisible| returns true before calling this. |
| 307 void PruneAllButVisibleInternal(); | 307 void PruneAllButVisibleInternal(); |
| 308 | 308 |
| 309 // Returns true if the navigation is redirect. | |
| 310 bool IsRedirect(const ViewHostMsg_FrameNavigate_Params& params); | |
| 311 | |
| 312 // Returns true if the navigation is likley to be automatic rather than | 309 // Returns true if the navigation is likley to be automatic rather than |
| 313 // user-initiated. | 310 // user-initiated. |
| 314 bool IsLikelyAutoNavigation(base::TimeTicks now); | 311 bool IsLikelyAutoNavigation(base::TimeTicks now); |
| 315 | 312 |
| 316 // Inserts up to |max_index| entries from |source| into this. This does NOT | 313 // Inserts up to |max_index| entries from |source| into this. This does NOT |
| 317 // adjust any of the members that reference entries_ | 314 // adjust any of the members that reference entries_ |
| 318 // (last_committed_entry_index_, pending_entry_index_ or | 315 // (last_committed_entry_index_, pending_entry_index_ or |
| 319 // transient_entry_index_). | 316 // transient_entry_index_). |
| 320 void InsertEntriesFrom(const NavigationControllerImpl& source, int max_index); | 317 void InsertEntriesFrom(const NavigationControllerImpl& source, int max_index); |
| 321 | 318 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 TimeSmoother time_smoother_; | 398 TimeSmoother time_smoother_; |
| 402 | 399 |
| 403 scoped_ptr<WebContentsScreenshotManager> screenshot_manager_; | 400 scoped_ptr<WebContentsScreenshotManager> screenshot_manager_; |
| 404 | 401 |
| 405 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); | 402 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); |
| 406 }; | 403 }; |
| 407 | 404 |
| 408 } // namespace content | 405 } // namespace content |
| 409 | 406 |
| 410 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ | 407 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ |
| OLD | NEW |