Chromium Code Reviews| 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 76a6083057216dc72d498aa89f21a097d85c007e..77deab6d4bc938cc1d1c98a930289c28014b864a 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 |
| @@ -172,6 +172,14 @@ public class ContentViewRenderView extends FrameLayout { |
| */ |
| public void setCurrentContentView(ContentView contentView) { |
| assert mNativeContentViewRenderView != 0; |
| + |
| + if (mCurrentContentView != contentView) { |
| + ContentViewCore oldContentViewCore = |
| + contentView != null ? mCurrentContentView.getContentViewCore() : null; |
|
jdduke (slow)
2013/10/16 23:12:26
Do you mean "mCurrentContentView != null"?
powei
2013/10/19 00:05:18
Done. Removed.
|
| + nativeRemovePreviousContentView(mNativeContentViewRenderView, |
| + oldContentViewCore != null ? oldContentViewCore.getNativeContentViewCore() : 0); |
| + } |
| + |
| mCurrentContentView = contentView; |
| ContentViewCore contentViewCore = |
| @@ -281,6 +289,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, |