Chromium Code Reviews| Index: content/browser/web_contents/web_contents_view_android.cc |
| diff --git a/content/browser/web_contents/web_contents_view_android.cc b/content/browser/web_contents/web_contents_view_android.cc |
| index 0dc8bf471cc26e6bdadcf88854b21981f2e4fa66..93436c9bed28e47dc1c26b6fddd258282fd687f8 100644 |
| --- a/content/browser/web_contents/web_contents_view_android.cc |
| +++ b/content/browser/web_contents/web_contents_view_android.cc |
| @@ -83,8 +83,8 @@ WebContentsViewAndroid::WebContentsViewAndroid( |
| : web_contents_(web_contents), |
| content_view_core_(NULL), |
| delegate_(delegate), |
| - synchronous_compositor_client_(nullptr) { |
| -} |
| + view_(this), |
| + synchronous_compositor_client_(nullptr) {} |
| WebContentsViewAndroid::~WebContentsViewAndroid() { |
| if (view_.GetLayer()) |
| @@ -237,6 +237,22 @@ void WebContentsViewAndroid::RenderViewSwappedIn(RenderViewHost* host) { |
| void WebContentsViewAndroid::SetOverscrollControllerEnabled(bool enabled) { |
| } |
| +bool WebContentsViewAndroid::OnPhysicalBackingSizeChanged(int width, |
| + int height) { |
| + // |SendScreenRects()| indirectly calls GetViewSize() that asks Java layer. |
| + web_contents_->SendScreenRects(); |
| + |
| + RenderWidgetHostView* rwhv = !web_contents_->ShowingInterstitialPage() ? |
|
boliu
2016/12/06 00:34:14
it's not clear to me why WasResized should only ca
Jinsuk Kim
2016/12/06 07:35:07
I don't have good answers to your questions. You m
boliu
2016/12/06 19:13:59
afaict that's a bug in CVCImpl. Update both.
Jinsuk Kim
2016/12/07 12:36:28
Done. I think the bug is addressed by letting each
|
| + web_contents_->GetRenderWidgetHostView() : |
| + web_contents_->GetInterstitialPage() |
| + ->GetMainFrame() |
| + ->GetRenderViewHost() |
| + ->GetWidget() |
| + ->GetView(); |
| + (static_cast<RenderWidgetHostViewAndroid*>(rwhv))->WasResized(); |
| + return true; |
| +} |
| + |
| void WebContentsViewAndroid::ShowContextMenu( |
| RenderFrameHost* render_frame_host, const ContextMenuParams& params) { |
| if (delegate_) |