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

Unified Diff: chrome/browser/android/tab_android.cc

Issue 2088443003: Shortcut ctrl+shift+T added on android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix issues based on feedback. 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/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index efd00c4aaab7e2cf4591d60c291f952945b7cf13..f1113280f94c1dfb4c03d91d42713037ba647f7e 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -62,6 +62,7 @@
#include "components/offline_pages/offline_page_item.h"
#include "components/offline_pages/offline_page_model.h"
#include "components/sessions/content/content_live_tab.h"
+#include "components/sessions/content/content_platform_specific_tab_data.h"
#include "components/sessions/core/tab_restore_service.h"
#include "components/url_formatter/url_fixer.h"
#include "content/public/browser/android/compositor.h"
@@ -88,6 +89,9 @@
#include "ui/gfx/favicon_size.h"
#include "ui/gfx/image/image_skia.h"
+
+
+
using base::android::AttachCurrentThread;
using base::android::ConvertUTF8ToJavaString;
using content::BrowserThread;
@@ -704,10 +708,20 @@ void TabAndroid::CreateHistoricalTabFromContents(WebContents* web_contents) {
tab_url.SchemeIs(url::kAboutScheme)) {
return;
}
+ sessions::ContentLiveTab* content_live_tab =
+ sessions::ContentLiveTab::GetForWebContents(web_contents);
+
+ // write window id so we know tab model id when recover tab.
+ using ContentData = sessions::ContentPlatformSpecificTabData;
+ ContentData* platform_data =
+ static_cast<ContentData*>
+ (content_live_tab->GetPlatformSpecificTabData().get());
+ TabAndroid* tab_android = TabAndroid::FromWebContents(web_contents);
+
+ platform_data->SetWindowId(tab_android->window_id().id());
// TODO(jcivelli): is the index important?
- service->CreateHistoricalTab(
- sessions::ContentLiveTab::GetForWebContents(web_contents), -1);
+ service->CreateHistoricalTab(content_live_tab, -1);
}
void TabAndroid::CreateHistoricalTab(JNIEnv* env,

Powered by Google App Engine
This is Rietveld 408576698