| 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..fc5745f96211ed9a96288486f42e49038f6b22f0 100644
|
| --- a/chrome/browser/android/tab_state.cc
|
| +++ b/chrome/browser/android/tab_state.cc
|
| @@ -17,12 +17,14 @@
|
| #include "chrome/browser/android/tab_android.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| +#include "chrome/common/url_constants.h"
|
| #include "components/sessions/content/content_serialized_navigation_builder.h"
|
| #include "components/sessions/serialized_navigation_entry.h"
|
| #include "components/sessions/session_command.h"
|
| #include "content/public/browser/navigation_controller.h"
|
| #include "content/public/browser/navigation_entry.h"
|
| #include "content/public/browser/web_contents.h"
|
| +#include "content/public/common/url_constants.h"
|
| #include "jni/TabState_jni.h"
|
|
|
| using base::android::ConvertUTF16ToJavaString;
|
| @@ -551,6 +553,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);
|
| }
|
|
|