| 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_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 virtual bool IsInitialNavigation() const OVERRIDE; | 82 virtual bool IsInitialNavigation() const OVERRIDE; |
| 83 virtual void Reload(bool check_for_repost) OVERRIDE; | 83 virtual void Reload(bool check_for_repost) OVERRIDE; |
| 84 virtual void ReloadIgnoringCache(bool check_for_repost) OVERRIDE; | 84 virtual void ReloadIgnoringCache(bool check_for_repost) OVERRIDE; |
| 85 virtual void ReloadOriginalRequestURL(bool check_for_repost) OVERRIDE; | 85 virtual void ReloadOriginalRequestURL(bool check_for_repost) OVERRIDE; |
| 86 virtual void NotifyEntryChanged(const NavigationEntry* entry, | 86 virtual void NotifyEntryChanged(const NavigationEntry* entry, |
| 87 int index) OVERRIDE; | 87 int index) OVERRIDE; |
| 88 virtual void CopyStateFrom( | 88 virtual void CopyStateFrom( |
| 89 const NavigationController& source) OVERRIDE; | 89 const NavigationController& source) OVERRIDE; |
| 90 virtual void CopyStateFromAndPrune( | 90 virtual void CopyStateFromAndPrune( |
| 91 NavigationController* source) OVERRIDE; | 91 NavigationController* source) OVERRIDE; |
| 92 virtual void PruneAllButActive() OVERRIDE; | 92 virtual bool CanPruneAllButVisible() OVERRIDE; |
| 93 virtual void PruneAllButVisible() OVERRIDE; |
| 93 virtual void ClearAllScreenshots() OVERRIDE; | 94 virtual void ClearAllScreenshots() OVERRIDE; |
| 94 | 95 |
| 95 // The session storage namespace that all child RenderViews belonging to | 96 // The session storage namespace that all child RenderViews belonging to |
| 96 // |instance| should use. | 97 // |instance| should use. |
| 97 SessionStorageNamespace* GetSessionStorageNamespace( | 98 SessionStorageNamespace* GetSessionStorageNamespace( |
| 98 SiteInstance* instance); | 99 SiteInstance* instance); |
| 99 | 100 |
| 100 // Returns the index of the specified entry, or -1 if entry is not contained | 101 // Returns the index of the specified entry, or -1 if entry is not contained |
| 101 // in this NavigationController. | 102 // in this NavigationController. |
| 102 int GetIndexOfEntry(const NavigationEntryImpl* entry) const; | 103 int GetIndexOfEntry(const NavigationEntryImpl* entry) const; |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 // Discards the pending and transient entries. | 287 // Discards the pending and transient entries. |
| 287 void DiscardNonCommittedEntriesInternal(); | 288 void DiscardNonCommittedEntriesInternal(); |
| 288 | 289 |
| 289 // Discards the transient entry. | 290 // Discards the transient entry. |
| 290 void DiscardTransientEntry(); | 291 void DiscardTransientEntry(); |
| 291 | 292 |
| 292 // If we have the maximum number of entries, remove the oldest one in | 293 // If we have the maximum number of entries, remove the oldest one in |
| 293 // preparation to add another. | 294 // preparation to add another. |
| 294 void PruneOldestEntryIfFull(); | 295 void PruneOldestEntryIfFull(); |
| 295 | 296 |
| 296 // Removes all the entries except the active entry. If there is a new pending | 297 // Removes all entries except the last committed entry. If there is a new |
| 297 // navigation it is preserved. In contrast to PruneAllButActive() this does | 298 // pending navigation it is preserved. In contrast to PruneAllButVisible() |
| 298 // not update the session history of the RenderView. | 299 // this does not update the session history of the RenderView. Callers |
| 299 void PruneAllButActiveInternal(); | 300 // must ensure that |CanPruneAllButVisible| returns true before calling this. |
| 301 void PruneAllButVisibleInternal(); |
| 300 | 302 |
| 301 // Returns true if the navigation is redirect. | 303 // Returns true if the navigation is redirect. |
| 302 bool IsRedirect(const ViewHostMsg_FrameNavigate_Params& params); | 304 bool IsRedirect(const ViewHostMsg_FrameNavigate_Params& params); |
| 303 | 305 |
| 304 // Returns true if the navigation is likley to be automatic rather than | 306 // Returns true if the navigation is likley to be automatic rather than |
| 305 // user-initiated. | 307 // user-initiated. |
| 306 bool IsLikelyAutoNavigation(base::TimeTicks now); | 308 bool IsLikelyAutoNavigation(base::TimeTicks now); |
| 307 | 309 |
| 308 // Inserts up to |max_index| entries from |source| into this. This does NOT | 310 // Inserts up to |max_index| entries from |source| into this. This does NOT |
| 309 // adjust any of the members that reference entries_ | 311 // adjust any of the members that reference entries_ |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 TimeSmoother time_smoother_; | 395 TimeSmoother time_smoother_; |
| 394 | 396 |
| 395 scoped_ptr<WebContentsScreenshotManager> screenshot_manager_; | 397 scoped_ptr<WebContentsScreenshotManager> screenshot_manager_; |
| 396 | 398 |
| 397 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); | 399 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); |
| 398 }; | 400 }; |
| 399 | 401 |
| 400 } // namespace content | 402 } // namespace content |
| 401 | 403 |
| 402 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 404 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
| OLD | NEW |