diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-18 19:52:40 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-18 19:52:40 +0000 |
commit | 1ef5ad42064c8ef0d1503b68a7fbac01887ca093 (patch) | |
tree | 34a32b11a9db6f69fef27e7e81863d82a29bcd2d /chrome/browser/tab_contents/navigation_controller.h | |
parent | 59b49a66c3cd959fcf9d7b4bd9c6d88c70b39919 (diff) | |
download | chromium_src-1ef5ad42064c8ef0d1503b68a7fbac01887ca093.zip chromium_src-1ef5ad42064c8ef0d1503b68a7fbac01887ca093.tar.gz chromium_src-1ef5ad42064c8ef0d1503b68a7fbac01887ca093.tar.bz2 |
Reverting 14005.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/navigation_controller.h')
-rw-r--r-- | chrome/browser/tab_contents/navigation_controller.h | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/chrome/browser/tab_contents/navigation_controller.h b/chrome/browser/tab_contents/navigation_controller.h index e42f4ad..af7cf60 100644 --- a/chrome/browser/tab_contents/navigation_controller.h +++ b/chrome/browser/tab_contents/navigation_controller.h @@ -123,21 +123,34 @@ class NavigationController { // --------------------------------------------------------------------------- - NavigationController(TabContents* tab_contents, Profile* profile); + NavigationController(TabContents* initial_contents, Profile* profile); + + // Creates a NavigationController from the specified history. Processing + // for this is asynchronous and handled via the RestoreHelper (in + // navigation_controller.cc). + NavigationController( + Profile* profile, + const std::vector<TabNavigation>& navigations, + int selected_navigation); ~NavigationController(); + // Begin the destruction sequence for this NavigationController and all its + // registered tabs. The sequence is as follows: + // 1. All tabs are asked to Destroy themselves. + // 2. When each tab is finished Destroying, it will notify the controller. + // 3. Once all tabs are Destroyed, the NavigationController deletes itself. + // This ensures that all the TabContents outlive the NavigationController. + void Destroy(); + + // Clone the receiving navigation controller. Only the active tab contents is + // duplicated. + NavigationController* Clone(); + // Returns the profile for this controller. It can never be NULL. Profile* profile() const { return profile_; } - // Initializes this NavigationController with the given saved navigations, - // using selected_navigation as the currently loaded entry. Before this call - // the controller should be unused (there should be no current entry). This is - // used for session restore. - void RestoreFromState(const std::vector<TabNavigation>& navigations, - int selected_navigation); - // Active entry -------------------------------------------------------------- // Returns the active entry, which is the transient entry if any, the pending @@ -282,6 +295,10 @@ class NavigationController { // TabContents --------------------------------------------------------------- + // Notifies the controller that a TabContents that it owns has been destroyed. + // This is part of the NavigationController's Destroy sequence. + void TabContentsWasDestroyed(); + // Returns the tab contents associated with this controller. Non-NULL except // during set-up of the tab. TabContents* tab_contents() const { @@ -329,17 +346,13 @@ class NavigationController { // refs without reload, only change to "#" which we don't count as empty). bool IsURLInPageNavigation(const GURL& url) const; - // Copies the navigation state from the given controller to this one. This - // one should be empty (just created). - void CopyStateFrom(const NavigationController& source); - // Random data --------------------------------------------------------------- // Returns true if this NavigationController is is configured to load a URL // lazily. If true, use GetLazyTitle() and GetLazyFavIcon() to discover the // titles and favicons. Since no request was made, this is the only info // we have about this page. This feature is used by web application clusters. - bool LoadingURLLazily() const; + bool LoadingURLLazily(); const string16& GetLazyTitle() const; const SkBitmap& GetLazyFavIcon() const; @@ -412,6 +425,11 @@ class NavigationController { // committed. This will fill in the active entry to the details structure. void NotifyNavigationEntryCommitted(LoadCommittedDetails* details); + // Returns the TabContents for the |entry|'s type. If the TabContents + // doesn't yet exist, it is created. If a new TabContents is created, its + // parent is |parent|. Becomes part of |entry|'s SiteInstance. + TabContents* GetTabContentsCreateIfNecessary(const NavigationEntry& entry); + // Sets the max restored page ID this NavigationController has seen, if it // was restored from a previous session. void set_max_restored_page_id(int max_id) { max_restored_page_id_ = max_id; } |