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 77211351fab7e2da8043bee0dc454cdc914814e5..622f3d9c56d5320cb6a8fc774182383faf4e1783 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 |
| @@ -15,6 +15,7 @@ import android.widget.FrameLayout; |
| import org.chromium.base.annotations.CalledByNative; |
| import org.chromium.base.annotations.JNINamespace; |
| import org.chromium.content_public.browser.WebContents; |
| +import org.chromium.ui.base.EventHandler; |
| import org.chromium.ui.base.WindowAndroid; |
| /*** |
| @@ -71,8 +72,7 @@ public class ContentViewRenderView extends FrameLayout { |
| nativeSurfaceChanged(mNativeContentViewRenderView, |
| format, width, height, holder.getSurface()); |
| if (mContentViewCore != null) { |
| - mContentViewCore.onPhysicalBackingSizeChanged( |
| - width, height); |
| + getEventHandler().onPhysicalBackingSizeChanged(width, height); |
|
boliu
2016/12/06 00:34:14
looks like this class is used only by chromecast,
Jinsuk Kim
2016/12/06 07:35:07
Ack. I'll see about moving it out of content in a
Jinsuk Kim
2016/12/14 02:06:40
Found that this class is also used by content shel
|
| } |
| } |
| @@ -94,6 +94,10 @@ public class ContentViewRenderView extends FrameLayout { |
| mSurfaceView.setVisibility(VISIBLE); |
| } |
| + private EventHandler getEventHandler() { |
| + return mContentViewCore.getWebContents().getEventHandler(); |
| + } |
| + |
| /** |
| * 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 |
| @@ -128,7 +132,7 @@ public class ContentViewRenderView extends FrameLayout { |
| mContentViewCore = contentViewCore; |
| if (mContentViewCore != null) { |
| - mContentViewCore.onPhysicalBackingSizeChanged(getWidth(), getHeight()); |
| + getEventHandler().onPhysicalBackingSizeChanged(getWidth(), getHeight()); |
| nativeSetCurrentWebContents( |
| mNativeContentViewRenderView, mContentViewCore.getWebContents()); |
| } else { |