Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index f526f7ecbd7dcf78b081974a879ef5aab921677c..79f0cd1810837155153170aab399c95e442256a1 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -54,6 +54,7 @@ |
#include "content/common/page_messages.h" |
#include "content/common/render_message_filter.mojom.h" |
#include "content/common/view_messages.h" |
+#include "content/public/common/associated_interface_provider.h" |
#include "content/public/common/bindings_policy.h" |
#include "content/public/common/browser_side_navigation_policy.h" |
#include "content/public/common/content_client.h" |
@@ -1394,6 +1395,8 @@ void RenderViewImpl::OnForceRedraw(const ui::LatencyInfo& latency_info) { |
// blink::WebViewClient ------------------------------------------------------ |
+// TODO(csharrison): Migrate this method to WebFrameClient / RenderFrameImpl, as |
+// it is now serviced by a mojo interface scoped to the opener frame. |
WebView* RenderViewImpl::CreateView(WebLocalFrame* creator, |
const WebURLRequest& request, |
const WebWindowFeatures& features, |
@@ -1402,7 +1405,6 @@ WebView* RenderViewImpl::CreateView(WebLocalFrame* creator, |
bool suppress_opener) { |
RenderFrameImpl* creator_frame = RenderFrameImpl::FromWebFrame(creator); |
mojom::CreateNewWindowParamsPtr params = mojom::CreateNewWindowParams::New(); |
- params->opener_render_frame_id = creator_frame->GetRoutingID(); |
params->user_gesture = WebUserGestureIndicator::IsProcessingUserGesture(); |
if (GetContentClient()->renderer()->AllowPopup()) |
params->user_gesture = true; |
@@ -1449,8 +1451,8 @@ WebView* RenderViewImpl::CreateView(WebLocalFrame* creator, |
bool opened_by_user_gesture = params->user_gesture; |
mojom::CreateNewWindowReplyPtr reply; |
- RenderThreadImpl::current_render_message_filter()->CreateNewWindow( |
- std::move(params), &reply); |
+ mojom::FrameHostAssociatedPtr frame_host_ptr = creator_frame->GetFrameHost(); |
+ frame_host_ptr->CreateNewWindow(std::move(params), &reply); |
if (reply->route_id == MSG_ROUTING_NONE) |
return nullptr; |