Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index 44f62f7fea9538cfd3073a4019aa1148fd36893c..de3edcdad701bd089897e566fe29fe7802137105 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -568,9 +568,14 @@ void RenderViewImpl::Initialize( |
#endif |
display_mode_ = params.initial_size.display_mode; |
- webview_ = WebView::Create(this, is_hidden() |
- ? blink::kWebPageVisibilityStateHidden |
- : blink::kWebPageVisibilityStateVisible); |
+ WebFrame* opener_frame = |
+ RenderFrameImpl::ResolveOpener(params.opener_frame_route_id); |
+ |
+ webview_ = |
+ WebView::Create(this, |
+ is_hidden() ? blink::kWebPageVisibilityStateHidden |
+ : blink::kWebPageVisibilityStateVisible, |
+ opener_frame ? opener_frame->View() : nullptr); |
RenderWidget::Init(show_callback, webview_->GetWidget()); |
g_view_map.Get().insert(std::make_pair(webview(), this)); |
@@ -622,9 +627,6 @@ void RenderViewImpl::Initialize( |
ApplyBlinkSettings(command_line, webview()->GetSettings()); |
- WebFrame* opener_frame = |
- RenderFrameImpl::ResolveOpener(params.opener_frame_route_id); |
- |
if (params.main_frame_routing_id != MSG_ROUTING_NONE) { |
main_render_frame_ = RenderFrameImpl::CreateMainFrame( |
this, params.main_frame_routing_id, params.main_frame_widget_routing_id, |