| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 // 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 |
| 102 // in this NavigationController. | 102 // in this NavigationController. |
| 103 int GetIndexOfEntry(const NavigationEntryImpl* entry) const; | 103 int GetIndexOfEntry(const NavigationEntryImpl* entry) const; |
| 104 | 104 |
| 105 // Return the index of the entry with the corresponding instance and page_id, | 105 // Return the index of the entry with the corresponding instance and page_id, |
| 106 // or -1 if not found. | 106 // or -1 if not found. |
| 107 int GetEntryIndexWithPageID(SiteInstance* instance, | 107 int GetEntryIndexWithPageID(SiteInstance* instance, |
| 108 int32 page_id) const; | 108 int32 page_id) const; |
| 109 | 109 |
| 110 // Return the index of the entry with the given unique id, or -1 if not found. | |
| 111 int GetEntryIndexWithUniqueID(int nav_entry_id) const; | |
| 112 | |
| 113 // Return the entry with the corresponding instance and page_id, or NULL if | 110 // Return the entry with the corresponding instance and page_id, or NULL if |
| 114 // not found. | 111 // not found. |
| 115 NavigationEntryImpl* GetEntryWithPageID( | 112 NavigationEntryImpl* GetEntryWithPageID( |
| 116 SiteInstance* instance, | 113 SiteInstance* instance, |
| 117 int32 page_id) const; | 114 int32 page_id) const; |
| 118 | 115 |
| 119 NavigationControllerDelegate* delegate() const { | 116 NavigationControllerDelegate* delegate() const { |
| 120 return delegate_; | 117 return delegate_; |
| 121 } | 118 } |
| 122 | 119 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 // |low_water_mark_| is the first time in a sequence of adjusted | 224 // |low_water_mark_| is the first time in a sequence of adjusted |
| 228 // times and |high_water_mark_| is the last. | 225 // times and |high_water_mark_| is the last. |
| 229 base::Time low_water_mark_; | 226 base::Time low_water_mark_; |
| 230 base::Time high_water_mark_; | 227 base::Time high_water_mark_; |
| 231 }; | 228 }; |
| 232 | 229 |
| 233 // Classifies the given renderer navigation (see the NavigationType enum). | 230 // Classifies the given renderer navigation (see the NavigationType enum). |
| 234 NavigationType ClassifyNavigation( | 231 NavigationType ClassifyNavigation( |
| 235 RenderFrameHostImpl* rfh, | 232 RenderFrameHostImpl* rfh, |
| 236 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) const; | 233 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) const; |
| 237 // This does the same as above (hopefully), but does so without any use of | |
| 238 // deprecated page id values. Once it bakes and is verified to behave the | |
| 239 // same, it will replace it. http://crbug.com/369661 | |
| 240 NavigationType ClassifyNavigationWithoutPageID( | |
| 241 RenderFrameHostImpl* rfh, | |
| 242 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) const; | |
| 243 | 234 |
| 244 // Causes the controller to load the specified entry. The function assumes | 235 // Causes the controller to load the specified entry. The function assumes |
| 245 // ownership of the pointer since it is put in the navigation list. | 236 // ownership of the pointer since it is put in the navigation list. |
| 246 // NOTE: Do not pass an entry that the controller already owns! | 237 // NOTE: Do not pass an entry that the controller already owns! |
| 247 void LoadEntry(NavigationEntryImpl* entry); | 238 void LoadEntry(NavigationEntryImpl* entry); |
| 248 | 239 |
| 249 // Handlers for the different types of navigation types. They will actually | 240 // Handlers for the different types of navigation types. They will actually |
| 250 // handle the navigations corresponding to the different NavClasses above. | 241 // handle the navigations corresponding to the different NavClasses above. |
| 251 // They will NOT broadcast the commit notification, that should be handled by | 242 // They will NOT broadcast the commit notification, that should be handled by |
| 252 // the caller. | 243 // the caller. |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 TimeSmoother time_smoother_; | 421 TimeSmoother time_smoother_; |
| 431 | 422 |
| 432 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_; | 423 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_; |
| 433 | 424 |
| 434 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); | 425 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); |
| 435 }; | 426 }; |
| 436 | 427 |
| 437 } // namespace content | 428 } // namespace content |
| 438 | 429 |
| 439 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ | 430 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ |
| OLD | NEW |