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..f63a72dbd223a6328bcfef444e07430421cbb9b7 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,21 @@ void WebContentsViewAndroid::RenderViewSwappedIn(RenderViewHost* host) { |
| void WebContentsViewAndroid::SetOverscrollControllerEnabled(bool enabled) { |
| } |
| +void WebContentsViewAndroid::OnPhysicalBackingSizeChanged(int width, |
| + int height) { |
| + // |SendScreenRects()| indirectly calls GetViewSize() that asks Java layer. |
| + web_contents_->SendScreenRects(); |
|
boliu
2016/12/06 23:15:46
so this code is duplicated from ContentViewCoreImp
Jinsuk Kim
2016/12/07 12:36:28
Done.
|
| + |
| + RenderWidgetHostView* rwhv = !web_contents_->ShowingInterstitialPage() ? |
| + web_contents_->GetRenderWidgetHostView() : |
| + web_contents_->GetInterstitialPage() |
| + ->GetMainFrame() |
| + ->GetRenderViewHost() |
| + ->GetWidget() |
| + ->GetView(); |
| + (static_cast<RenderWidgetHostViewAndroid*>(rwhv))->WasResized(); |
| +} |
| + |
| void WebContentsViewAndroid::ShowContextMenu( |
| RenderFrameHost* render_frame_host, const ContextMenuParams& params) { |
| if (delegate_) |