| Index: chrome/browser/sessions/chrome_tab_restore_service_client.cc
|
| diff --git a/chrome/browser/sessions/chrome_tab_restore_service_client.cc b/chrome/browser/sessions/chrome_tab_restore_service_client.cc
|
| index 4f80b595bd0a2024d9eba6348580767b37598685..93ed47513c7d29cc3a02c8103021e3a4c029f0c6 100644
|
| --- a/chrome/browser/sessions/chrome_tab_restore_service_client.cc
|
| +++ b/chrome/browser/sessions/chrome_tab_restore_service_client.cc
|
| @@ -18,6 +18,10 @@
|
| #include "extensions/common/extension_set.h"
|
| #endif
|
|
|
| +#if !defined(OS_ANDROID)
|
| +#include "chrome/browser/ui/browser_tab_restore_service_delegate.h"
|
| +#endif
|
| +
|
| namespace {
|
|
|
| void RecordAppLaunch(Profile* profile, const GURL& url) {
|
| @@ -41,6 +45,47 @@ ChromeTabRestoreServiceClient::ChromeTabRestoreServiceClient(Profile* profile)
|
|
|
| ChromeTabRestoreServiceClient::~ChromeTabRestoreServiceClient() {}
|
|
|
| +TabRestoreServiceDelegate*
|
| +ChromeTabRestoreServiceClient::CreateTabRestoreServiceDelegate(
|
| + int host_desktop_type,
|
| + const std::string& app_name) {
|
| +#if defined(OS_ANDROID)
|
| + // Android does not support TabRestoreServiceDelegate, as tab persistence
|
| + // is implemented on the Java side.
|
| + return nullptr;
|
| +#else
|
| + return BrowserTabRestoreServiceDelegate::Create(
|
| + profile_, static_cast<chrome::HostDesktopType>(host_desktop_type),
|
| + app_name);
|
| +#endif
|
| +}
|
| +
|
| +TabRestoreServiceDelegate*
|
| +ChromeTabRestoreServiceClient::FindTabRestoreServiceDelegateForWebContents(
|
| + const content::WebContents* contents) {
|
| +#if defined(OS_ANDROID)
|
| + // Android does not support TabRestoreServiceDelegate, as tab persistence
|
| + // is implemented on the Java side.
|
| + return nullptr;
|
| +#else
|
| + return BrowserTabRestoreServiceDelegate::FindDelegateForWebContents(contents);
|
| +#endif
|
| +}
|
| +
|
| +TabRestoreServiceDelegate*
|
| +ChromeTabRestoreServiceClient::FindTabRestoreServiceDelegateWithID(
|
| + SessionID::id_type desired_id,
|
| + int host_desktop_type) {
|
| +#if defined(OS_ANDROID)
|
| + // Android does not support TabRestoreServiceDelegate, as tab persistence
|
| + // is implemented on the Java side.
|
| + return nullptr;
|
| +#else
|
| + return BrowserTabRestoreServiceDelegate::FindDelegateWithID(
|
| + desired_id, static_cast<chrome::HostDesktopType>(host_desktop_type));
|
| +#endif
|
| +}
|
| +
|
| bool ChromeTabRestoreServiceClient::ShouldTrackURLForRestore(const GURL& url) {
|
| return ::ShouldTrackURLForRestore(url);
|
| }
|
|
|