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

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

Issue 21656002: Return webcontents and add in test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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.h
diff --git a/chrome/browser/sessions/tab_restore_service.h b/chrome/browser/sessions/tab_restore_service.h
index e230deffff15d28719367ec4008b174bf2bf5ef9..a80b302ee8240adaf31b505573a9d8d4749cb696 100644
--- a/chrome/browser/sessions/tab_restore_service.h
+++ b/chrome/browser/sessions/tab_restore_service.h
@@ -155,8 +155,9 @@ class TabRestoreService : public BrowserContextKeyedService {
// Restores the most recently closed entry. Does nothing if there are no
// entries to restore. If the most recently restored entry is a tab, it is
// added to |delegate|. If a new browser needs to be created for this entry,
- // it will be created on the desktop specified by |host_desktop_type|.
- virtual void RestoreMostRecentEntry(
+ // it will be created on the desktop specified by |host_desktop_type|. Returns
+ // the WebContents of the restored tab(s).
+ virtual std::vector<content::WebContents*> RestoreMostRecentEntry(
TabRestoreServiceDelegate* delegate,
chrome::HostDesktopType host_desktop_type) = 0;
@@ -170,10 +171,12 @@ class TabRestoreService : public BrowserContextKeyedService {
// browser window) of the tab when it was closed will be respected if
// disposition is UNKNOWN. If a new browser needs to be created for this
// entry, it will be created on the desktop specified by |host_desktop_type|.
- virtual void RestoreEntryById(TabRestoreServiceDelegate* delegate,
- SessionID::id_type id,
- chrome::HostDesktopType host_desktop_type,
- WindowOpenDisposition disposition) = 0;
+ // Returns the WebContents of the restored tab(s).
+ virtual std::vector<content::WebContents*> RestoreEntryById(
+ TabRestoreServiceDelegate* delegate,
+ SessionID::id_type id,
+ chrome::HostDesktopType host_desktop_type,
+ WindowOpenDisposition disposition) = 0;
// Loads the tabs and previous session. This does nothing if the tabs
// from the previous session have already been loaded.
« no previous file with comments | « chrome/browser/sessions/session_restore_browsertest.cc ('k') | chrome/browser/sessions/tab_restore_service_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698