| Index: content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
|
| index 5b3cd356dcbb8fd05fb56427aa9a9d5f348c71a0..f2244152eaeac9c8657ea85131b0800d081ccb6f 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewRenderView.java
|
| @@ -171,6 +171,14 @@ public class ContentViewRenderView extends FrameLayout {
|
| */
|
| public void setCurrentContentView(ContentView contentView) {
|
| assert mNativeContentViewRenderView != 0;
|
| +
|
| + if (mCurrentContentView != contentView) {
|
| + ContentViewCore oldContentViewCore =
|
| + contentView != null ? mCurrentContentView.getContentViewCore() : null;
|
| + nativeRemovePreviousContentView(mNativeContentViewRenderView,
|
| + oldContentViewCore != null ? oldContentViewCore.getNativeContentViewCore() : 0);
|
| + }
|
| +
|
| mCurrentContentView = contentView;
|
|
|
| ContentViewCore contentViewCore =
|
| @@ -271,6 +279,8 @@ public class ContentViewRenderView extends FrameLayout {
|
| private native void nativeDestroy(int nativeContentViewRenderView);
|
| private native void nativeSetCurrentContentView(int nativeContentViewRenderView,
|
| int nativeContentView);
|
| + private native void nativeRemovePreviousContentView(int nativeContentViewRenderView,
|
| + int nativeContentView);
|
| private native void nativeSurfaceCreated(int nativeContentViewRenderView, Surface surface);
|
| private native void nativeSurfaceDestroyed(int nativeContentViewRenderView);
|
| private native void nativeSurfaceSetSize(int nativeContentViewRenderView,
|
|
|