| 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 80b3593f3b1d798dce4770b6e686a07776b7ebf5..afeca29ca990e8c48d71f2433f29d9af2e8cf02e 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
|
| @@ -31,7 +31,7 @@ public class ContentViewRenderView extends FrameLayout {
|
| private SurfaceHolder.Callback mSurfaceCallback;
|
|
|
| private final SurfaceView mSurfaceView;
|
| - protected ContentViewCore mContentViewCore;
|
| + private ViewRoot mViewRoot;
|
|
|
| /**
|
| * Constructs a new ContentViewRenderView.
|
| @@ -71,8 +71,8 @@ public class ContentViewRenderView extends FrameLayout {
|
| assert mNativeContentViewRenderView != 0;
|
| nativeSurfaceChanged(mNativeContentViewRenderView,
|
| format, width, height, holder.getSurface());
|
| - if (mContentViewCore != null) {
|
| - getViewRoot().onPhysicalBackingSizeChanged(width, height);
|
| + if (mViewRoot != null) {
|
| + mViewRoot.onPhysicalBackingSizeChanged(width, height);
|
| }
|
| }
|
|
|
| @@ -94,10 +94,6 @@ public class ContentViewRenderView extends FrameLayout {
|
| mSurfaceView.setVisibility(VISIBLE);
|
| }
|
|
|
| - private ViewRoot getViewRoot() {
|
| - return mContentViewCore.getWindowAndroid().getViewRoot();
|
| - }
|
| -
|
| /**
|
| * Sets the background color of the surface view. This method is necessary because the
|
| * background color of ContentViewRenderView itself is covered by the background of
|
| @@ -129,12 +125,11 @@ public class ContentViewRenderView extends FrameLayout {
|
|
|
| public void setCurrentContentViewCore(ContentViewCore contentViewCore) {
|
| assert mNativeContentViewRenderView != 0;
|
| - mContentViewCore = contentViewCore;
|
| -
|
| - if (mContentViewCore != null) {
|
| - getViewRoot().onPhysicalBackingSizeChanged(getWidth(), getHeight());
|
| + if (contentViewCore != null) {
|
| + mViewRoot = contentViewCore.getViewRoot();
|
| + mViewRoot.onPhysicalBackingSizeChanged(getWidth(), getHeight());
|
| nativeSetCurrentWebContents(
|
| - mNativeContentViewRenderView, mContentViewCore.getWebContents());
|
| + mNativeContentViewRenderView, contentViewCore.getWebContents());
|
| } else {
|
| nativeSetCurrentWebContents(mNativeContentViewRenderView, null);
|
| }
|
|
|