Chromium Code Reviews| 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 01f69fd75597917f2a663c0e5c3f4863b7ac067f..391761178e74dc706ab1f20e0a2ab63ecc27bf83 100644 |
| --- a/chrome/browser/sessions/chrome_tab_restore_service_client.cc |
| +++ b/chrome/browser/sessions/chrome_tab_restore_service_client.cc |
| @@ -23,6 +23,8 @@ |
| #if !defined(OS_ANDROID) |
| #include "chrome/browser/ui/browser_live_tab_context.h" |
| +#else |
| +#include "chrome/browser/ui/android/tab_model/android_live_tab_context.h" |
| #endif |
| namespace { |
| @@ -51,8 +53,9 @@ ChromeTabRestoreServiceClient::~ChromeTabRestoreServiceClient() {} |
| sessions::LiveTabContext* ChromeTabRestoreServiceClient::CreateLiveTabContext( |
| const std::string& app_name) { |
| #if defined(OS_ANDROID) |
| - // Android does not support LiveTabContext, as tab persistence |
| - // is implemented on the Java side. |
| + // Android does not initialize LiveTabContext here, and tab persistence is |
| + // implemented in java. |
| + NOTREACHED(); |
| return nullptr; |
|
Theresa
2016/07/02 01:00:37
This needs to be implemented to use TabRestoreServ
|
| #else |
| return BrowserLiveTabContext::Create(profile_, app_name); |
| @@ -63,9 +66,8 @@ sessions::LiveTabContext* |
| ChromeTabRestoreServiceClient::FindLiveTabContextForTab( |
| const sessions::LiveTab* tab) { |
| #if defined(OS_ANDROID) |
| - // Android does not support LiveTabContext, as tab persistence |
| - // is implemented on the Java side. |
| - return nullptr; |
| + return AndroidLiveTabContext::FindContextForWebContents( |
| + static_cast<const sessions::ContentLiveTab*>(tab)->web_contents()); |
| #else |
| return BrowserLiveTabContext::FindContextForWebContents( |
| static_cast<const sessions::ContentLiveTab*>(tab)->web_contents()); |