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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 1844343005: WIP - Control the lifetime of RenderThreadManager from Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 06ead1d1c420d238965cd9c1d7b04ee25386908a..035dfb6bb429b7ed69b158becddf1ed451773693 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -41,6 +41,7 @@ import android.view.inputmethod.InputConnection;
import android.webkit.JavascriptInterface;
import android.webkit.ValueCallback;
+import org.chromium.android_webview.browser.SharedRendererState;
import org.chromium.android_webview.permission.AwGeolocationCallback;
import org.chromium.android_webview.permission.AwPermissionRequest;
import org.chromium.base.LocaleUtils;
@@ -220,6 +221,7 @@ public class AwContents implements SmartClipProvider,
private long mNativeAwContents;
private final AwBrowserContext mBrowserContext;
private ViewGroup mContainerView;
+ private SharedRendererState mSharedRendererState;
private final Context mContext;
private final int mAppTargetSdkVersion;
private ContentViewCore mContentViewCore;
@@ -967,6 +969,9 @@ public class AwContents implements SmartClipProvider,
mContentViewCore = createAndInitializeContentViewCore(mContainerView, mContext,
mInternalAccessAdapter, webContents, new AwGestureStateListener(),
mContentViewClient, mZoomControls, mWindowAndroid.getWindowAndroid());
+ mSharedRendererState =
+ new SharedRendererState(nativeCreateSharedRendererState(mNativeAwContents));
+
nativeSetJavaPeers(mNativeAwContents, this, mWebContentsDelegate, mContentsClientBridge,
mIoThreadClient, mInterceptNavigationDelegate);
mWebContents = mContentViewCore.getWebContents();
@@ -3231,6 +3236,7 @@ public class AwContents implements SmartClipProvider,
AwContentsClientBridge contentsClientBridge,
AwContentsIoThreadClient ioThreadClient,
InterceptNavigationDelegate navigationInterceptionDelegate);
+ private native long nativeCreateSharedRendererState(long nativeAwContents);
private native WebContents nativeGetWebContents(long nativeAwContents);
private native void nativeDocumentHasImages(long nativeAwContents, Message message);

Powered by Google App Engine
This is Rietveld 408576698