Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5079)

Unified Diff: chrome/browser/sessions/tab_restore_service_helper.h

Issue 1321713005: Abstract WebContents/NavigationController from core TabRestore code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sessions/tab_restore_service_helper.h
diff --git a/chrome/browser/sessions/tab_restore_service_helper.h b/chrome/browser/sessions/tab_restore_service_helper.h
index c5d1f651fc9c3968f908e610d4fb6b02752f6b50..4c444e338548beba1f9821612f07b072a53ef285 100644
--- a/chrome/browser/sessions/tab_restore_service_helper.h
+++ b/chrome/browser/sessions/tab_restore_service_helper.h
@@ -20,11 +20,6 @@ class TabRestoreServiceDelegate;
class TabRestoreServiceObserver;
class TimeFactory;
-namespace content {
-class NavigationController;
-class WebContents;
-}
-
namespace sessions {
class TabRestoreServiceClient;
}
@@ -77,16 +72,16 @@ class TabRestoreServiceHelper {
// Helper methods used to implement TabRestoreService.
void AddObserver(TabRestoreServiceObserver* observer);
void RemoveObserver(TabRestoreServiceObserver* observer);
- void CreateHistoricalTab(content::WebContents* contents, int index);
+ void CreateHistoricalTab(sessions::LiveTab* live_tab, int index);
void BrowserClosing(TabRestoreServiceDelegate* delegate);
void BrowserClosed(TabRestoreServiceDelegate* delegate);
void ClearEntries();
const Entries& entries() const;
- std::vector<content::WebContents*> RestoreMostRecentEntry(
+ std::vector<sessions::LiveTab*> RestoreMostRecentEntry(
TabRestoreServiceDelegate* delegate,
int host_desktop_type);
Tab* RemoveTabEntryById(SessionID::id_type id);
- std::vector<content::WebContents*> RestoreEntryById(
+ std::vector<sessions::LiveTab*> RestoreEntryById(
TabRestoreServiceDelegate* delegate,
SessionID::id_type id,
int host_desktop_type,
@@ -120,12 +115,12 @@ class TabRestoreServiceHelper {
private:
friend class PersistentTabRestoreService;
- // Populates the tab's navigations from the NavigationController, and its
- // browser_id and pinned state from the browser.
+ // Populates the tab's navigations from the LiveTab, and its browser_id and
+ // pinned state from the delegate.
void PopulateTab(Tab* tab,
int index,
TabRestoreServiceDelegate* delegate,
- content::NavigationController* controller);
+ sessions::LiveTab* live_tab);
// This is a helper function for RestoreEntryById() for restoring a single
// tab. If |delegate| is NULL, this creates a new window for the entry. This
@@ -135,12 +130,12 @@ class TabRestoreServiceHelper {
// TabRestoreServiceDelegate needs to be created for this tab,
// |host_desktop_type| will be passed to
// TabRestoreServiceClient::CreateTabRestoreServiceDelegate(). If present,
- // |contents| will be populated with the WebContents of the restored tab.
+ // |live_tab| will be populated with the LiveTab of the restored tab.
TabRestoreServiceDelegate* RestoreTab(const Tab& tab,
TabRestoreServiceDelegate* delegate,
int host_desktop_type,
WindowOpenDisposition disposition,
- content::WebContents** contents);
+ sessions::LiveTab** live_tab);
// Returns true if |tab| has more than one navigation. If |tab| has more
// than one navigation |tab->current_navigation_index| is constrained based
« no previous file with comments | « chrome/browser/sessions/tab_restore_service_delegate.h ('k') | chrome/browser/sessions/tab_restore_service_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698