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

Unified Diff: chrome/browser/sessions/chrome_tab_restore_service_client.cc

Issue 2088443003: Shortcut ctrl+shift+T added on android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wire android tab model with LiveTabContext, so when access tab restore service, we don't hurt its c… Created 4 years, 6 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
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..87f4367b37a0c981a753483282d7a098203a9294 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,8 @@ 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.
Theresa 2016/06/28 20:47:09 We should double check that this can't get called
return nullptr;
#else
return BrowserLiveTabContext::Create(profile_, app_name);
@@ -63,9 +65,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());

Powered by Google App Engine
This is Rietveld 408576698