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

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

Issue 1342743002: Remove Profile and HostDesktopType dependencies from core TabRestore code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac 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/chrome_browser_ui.gypi ('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 ce60f99f45c331d29315b2a68d63bbf5e2ec38c6..600d8dd416e5869d845dc35804704d9d00f6df09 100644
--- a/components/sessions/core/tab_restore_service_client.h
+++ b/components/sessions/core/tab_restore_service_client.h
@@ -15,11 +15,18 @@ class CancelableTaskTracker;
class SequencedWorkerPool;
}
+// TODO(blundell): Remove all references to WebContents from
+// TabRestoreServiceClient and get rid of this. crbug.com/530174
+namespace content {
+class WebContents;
+}
+
namespace sessions {
struct SessionWindow;
}
class GURL;
+class TabRestoreServiceDelegate;
namespace sessions {
@@ -36,6 +43,33 @@ class TabRestoreServiceClient {
public:
virtual ~TabRestoreServiceClient() {}
+ // Creates a TabRestoreServiceDelegate instance that is associated with
+ // |host_desktop_type| and |app_name|. May return nullptr (e.g., if the
+ // embedder does not support TabRestoreServiceDelegate functionality).
+ // Note that |host_desktop_type| is opaque to the component; the only values
+ // that will be passed here are those that have been passed *in* to the
+ // component from the embedder via TabRestoreService.
+ virtual TabRestoreServiceDelegate* CreateTabRestoreServiceDelegate(
+ int host_desktop_type,
+ const std::string& app_name) = 0;
+
+ // Returns the TabRestoreServiceDelegate instance that is associated with
+ // |contents|, or null if there is no such instance.
+ // TODO(blundell): Replace the usage of WebContents here with the cross-
+ // platform interface that will abstract it. crbug.com/530174
+ virtual TabRestoreServiceDelegate*
+ FindTabRestoreServiceDelegateForWebContents(
+ const content::WebContents* contents) = 0;
+
+ // Returns the TabRestoreServiceDelegate instance that is associated with
+ // |desired_id| and |host_desktop_type|, or null if there is no such instance.
+ // Note that |host_desktop_type| is opaque to the component; the only values
+ // that will be passed here are those that have been passed *in* to the
+ // component from the embedder via TabRestoreService.
+ virtual TabRestoreServiceDelegate* FindTabRestoreServiceDelegateWithID(
+ SessionID::id_type desired_id,
+ int host_desktop_type) = 0;
+
// Returns whether a given URL should be tracked for restoring.
virtual bool ShouldTrackURLForRestore(const GURL& url) = 0;
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698