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

Unified Diff: components/sessions/core/tab_restore_service_client.h

Issue 1309363007: [sessions] Remove most knowledge of //chrome from core tab restore code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tab_restore_service_client
Patch Set: Make OnTabRestored() optional 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
« no previous file with comments | « chrome/browser/sessions/tab_restore_service_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sessions/core/tab_restore_service_client.h
diff --git a/components/sessions/core/tab_restore_service_client.h b/components/sessions/core/tab_restore_service_client.h
index c2933220a22dfccb293597996cf24eaeefd6c5d9..e529751bb714387b9aff2c8db9c48cd0eee1af66 100644
--- a/components/sessions/core/tab_restore_service_client.h
+++ b/components/sessions/core/tab_restore_service_client.h
@@ -6,6 +6,7 @@
#define COMPONENTS_SESSIONS_CORE_TAB_RESTORE_SERVICE_CLIENT_H_
#include "base/callback.h"
+#include "base/files/file_path.h"
#include "base/memory/scoped_vector.h"
#include "components/sessions/session_id.h"
@@ -17,6 +18,8 @@ namespace sessions {
struct SessionWindow;
}
+class GURL;
+
namespace sessions {
struct SessionWindow;
@@ -32,6 +35,12 @@ class TabRestoreServiceClient {
public:
virtual ~TabRestoreServiceClient() {}
+ // Returns the path of the directory to save state into.
+ virtual base::FilePath GetPathToSaveTo() = 0;
+
+ // Returns the URL that corresponds to the new tab page.
+ virtual GURL GetNewTabURL() = 0;
+
// Returns whether there is a previous session to load.
virtual bool HasLastSession() = 0;
@@ -40,6 +49,10 @@ class TabRestoreServiceClient {
// it means the session could not be restored.
virtual void GetLastSession(const GetLastSessionCallback& callback,
base::CancelableTaskTracker* tracker) = 0;
+
+ // Called when a tab is restored. |url| is the URL that the tab is currently
+ // visiting.
+ virtual void OnTabRestored(const GURL& url) {}
};
} // namespace sessions
« no previous file with comments | « chrome/browser/sessions/tab_restore_service_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698