Commit c89d3dff authored by sadrul@chromium.org's avatar sadrul@chromium.org

aura: Don't Show() a newly created RenderWidgetHostView() for a hidden RenderWidgetHost.

BUG=284817
R=creis@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/23448003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221771 0039d316-1c4b-4281-b951-d872f2087c98
parent 9af61ee9
...@@ -1169,13 +1169,15 @@ RenderWidgetHostView* WebContentsViewAura::CreateViewForWidget( ...@@ -1169,13 +1169,15 @@ RenderWidgetHostView* WebContentsViewAura::CreateViewForWidget(
navigation_overlay_->StartObservingView(ToRenderWidgetHostViewAura(view)); navigation_overlay_->StartObservingView(ToRenderWidgetHostViewAura(view));
} }
view->Show(); RenderWidgetHostImpl* host_impl =
RenderWidgetHostImpl::From(render_widget_host);
if (!host_impl->is_hidden())
view->Show();
// We listen to drag drop events in the newly created view's window. // We listen to drag drop events in the newly created view's window.
aura::client::SetDragDropDelegate(view->GetNativeView(), this); aura::client::SetDragDropDelegate(view->GetNativeView(), this);
RenderWidgetHostImpl* host_impl =
RenderWidgetHostImpl::From(render_widget_host);
if (host_impl->overscroll_controller() && if (host_impl->overscroll_controller() &&
(!web_contents_->GetDelegate() || (!web_contents_->GetDelegate() ||
web_contents_->GetDelegate()->CanOverscrollContent())) { web_contents_->GetDelegate()->CanOverscrollContent())) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment