| Index: chrome/browser/android/content_view_util.cc
|
| diff --git a/chrome/browser/android/content_view_util.cc b/chrome/browser/android/content_view_util.cc
|
| index 898affb93910b178b28f69846de3e8cd1fb4351e..467494cf32deaf81205b2491546c3a804a4087e3 100644
|
| --- a/chrome/browser/android/content_view_util.cc
|
| +++ b/chrome/browser/android/content_view_util.cc
|
| @@ -8,6 +8,7 @@
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| +#include "content/public/browser/android/content_view_core.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "jni/ContentViewUtil_jni.h"
|
|
|
| @@ -22,6 +23,24 @@ static jlong CreateNativeWebContents(
|
| return reinterpret_cast<intptr_t>(content::WebContents::Create(params));
|
| }
|
|
|
| +static jlong CreateNativeWebContentsWithSharedSiteInstance(
|
| + JNIEnv* env,
|
| + jclass clazz,
|
| + jobject jcontent_view_core) {
|
| + content::ContentViewCore* content_view_core =
|
| + content::ContentViewCore::GetNativeContentViewCore(env,
|
| + jcontent_view_core);
|
| + CHECK(content_view_core);
|
| +
|
| + Profile* profile = Profile::FromBrowserContext(
|
| + content_view_core->GetWebContents()->GetBrowserContext());
|
| +
|
| + content::WebContents::CreateParams params(
|
| + profile, content_view_core->GetWebContents()->GetSiteInstance());
|
| +
|
| + return reinterpret_cast<intptr_t>(content::WebContents::Create(params));
|
| +}
|
| +
|
| static void DestroyNativeWebContents(
|
| JNIEnv* env, jclass clazz, jlong web_contents_ptr) {
|
| content::WebContents* web_contents =
|
|
|