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

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

Issue 774183004: Upstream historical tab logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@upstreaming_2
Patch Set: Created 6 years 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
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/tab_state.cc
diff --git a/chrome/browser/android/tab_state.cc b/chrome/browser/android/tab_state.cc
index afa6269988b5f9d5df6945e934189f58e61c1749..5e01566491aedfdac4cbd9d44756bee0e7dc70e1 100644
--- a/chrome/browser/android/tab_state.cc
+++ b/chrome/browser/android/tab_state.cc
@@ -551,6 +551,22 @@ static jstring GetVirtualUrlFromByteBuffer(JNIEnv* env,
return result.Release();
}
+// Creates a historical tab entry from the serialized tab contents contained
+// within |state|.
+static void CreateHistoricalTab(JNIEnv* env,
+ jclass clazz,
+ jobject state,
+ jint saved_state_version) {
+ scoped_ptr<WebContents> web_contents(
+ WebContentsState::RestoreContentsFromByteBuffer(env,
+ clazz,
+ state,
+ saved_state_version,
+ true));
+ if (web_contents.get())
+ TabAndroid::CreateHistoricalTabFromContents(web_contents.get());
+}
+
bool RegisterTabState(JNIEnv* env) {
return RegisterNativesImpl(env);
}
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698