| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TAB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/linked_ptr.h" | 11 #include "base/memory/linked_ptr.h" |
| 12 #include "base/time.h" | 12 #include "base/time.h" |
| 13 #include "content/browser/ssl/ssl_manager.h" | 13 #include "content/browser/ssl/ssl_manager.h" |
| 14 #include "content/public/browser/navigation_controller.h" | 14 #include "content/public/browser/navigation_controller.h" |
| 15 #include "content/public/browser/navigation_type.h" | 15 #include "content/public/browser/navigation_type.h" |
| 16 | 16 |
| 17 class SiteInstance; | |
| 18 class TabContents; | 17 class TabContents; |
| 19 struct ViewHostMsg_FrameNavigate_Params; | 18 struct ViewHostMsg_FrameNavigate_Params; |
| 20 | 19 |
| 21 namespace content { | 20 namespace content { |
| 22 class NavigationEntryImpl; | 21 class NavigationEntryImpl; |
| 23 struct LoadCommittedDetails; | 22 struct LoadCommittedDetails; |
| 23 class SiteInstance; |
| 24 } | 24 } |
| 25 | 25 |
| 26 class CONTENT_EXPORT NavigationControllerImpl | 26 class CONTENT_EXPORT NavigationControllerImpl |
| 27 : public NON_EXPORTED_BASE(content::NavigationController) { | 27 : public NON_EXPORTED_BASE(content::NavigationController) { |
| 28 public: | 28 public: |
| 29 NavigationControllerImpl(TabContents* tab_contents, | 29 NavigationControllerImpl(TabContents* tab_contents, |
| 30 content::BrowserContext* browser_context, | 30 content::BrowserContext* browser_context, |
| 31 SessionStorageNamespace* session_storage_namespace); | 31 SessionStorageNamespace* session_storage_namespace); |
| 32 virtual ~NavigationControllerImpl(); | 32 virtual ~NavigationControllerImpl(); |
| 33 | 33 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 virtual void CopyStateFromAndPrune( | 93 virtual void CopyStateFromAndPrune( |
| 94 content::NavigationController* source) OVERRIDE; | 94 content::NavigationController* source) OVERRIDE; |
| 95 virtual void PruneAllButActive() OVERRIDE; | 95 virtual void PruneAllButActive() OVERRIDE; |
| 96 | 96 |
| 97 // Returns the index of the specified entry, or -1 if entry is not contained | 97 // Returns the index of the specified entry, or -1 if entry is not contained |
| 98 // in this NavigationController. | 98 // in this NavigationController. |
| 99 int GetIndexOfEntry(const content::NavigationEntryImpl* entry) const; | 99 int GetIndexOfEntry(const content::NavigationEntryImpl* entry) const; |
| 100 | 100 |
| 101 // Return the index of the entry with the corresponding instance and page_id, | 101 // Return the index of the entry with the corresponding instance and page_id, |
| 102 // or -1 if not found. | 102 // or -1 if not found. |
| 103 int GetEntryIndexWithPageID(SiteInstance* instance, | 103 int GetEntryIndexWithPageID(content::SiteInstance* instance, |
| 104 int32 page_id) const; | 104 int32 page_id) const; |
| 105 | 105 |
| 106 // Return the entry with the corresponding instance and page_id, or NULL if | 106 // Return the entry with the corresponding instance and page_id, or NULL if |
| 107 // not found. | 107 // not found. |
| 108 content::NavigationEntryImpl* GetEntryWithPageID(SiteInstance* instance, | 108 content::NavigationEntryImpl* GetEntryWithPageID( |
| 109 int32 page_id) const; | 109 content::SiteInstance* instance, |
| 110 int32 page_id) const; |
| 110 | 111 |
| 111 // Transient entry ----------------------------------------------------------- | 112 // Transient entry ----------------------------------------------------------- |
| 112 | 113 |
| 113 // Adds an entry that is returned by GetActiveEntry(). The entry is | 114 // Adds an entry that is returned by GetActiveEntry(). The entry is |
| 114 // transient: any navigation causes it to be removed and discarded. | 115 // transient: any navigation causes it to be removed and discarded. |
| 115 // The NavigationController becomes the owner of |entry| and deletes it when | 116 // The NavigationController becomes the owner of |entry| and deletes it when |
| 116 // it discards it. This is useful with interstitial page that need to be | 117 // it discards it. This is useful with interstitial page that need to be |
| 117 // represented as an entry, but should go away when the user navigates away | 118 // represented as an entry, but should go away when the user navigates away |
| 118 // from them. | 119 // from them. |
| 119 // Note that adding a transient entry does not change the active contents. | 120 // Note that adding a transient entry does not change the active contents. |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 static size_t max_entry_count_for_testing_; | 315 static size_t max_entry_count_for_testing_; |
| 315 | 316 |
| 316 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), | 317 // If a repost is pending, its type (RELOAD or RELOAD_IGNORING_CACHE), |
| 317 // NO_RELOAD otherwise. | 318 // NO_RELOAD otherwise. |
| 318 ReloadType pending_reload_; | 319 ReloadType pending_reload_; |
| 319 | 320 |
| 320 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); | 321 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); |
| 321 }; | 322 }; |
| 322 | 323 |
| 323 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 324 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
| OLD | NEW |