| 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;
|
|
|
|
|