Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Unified Diff: content/browser/renderer_host/render_message_filter.cc

Issue 2821473002: Service CreateNewWindow on the UI thread with a new mojo interface (Closed)
Patch Set: MakeShared goodness Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_message_filter.cc
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index da4804e730148e3180fcc2e2d068ac44f511aaf0..dcb2f999f2d9911ea52713541dc17db916e83b15 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -199,40 +199,6 @@ void RenderMessageFilter::GenerateRoutingID(
callback.Run(render_widget_helper_->GetNextRoutingID());
}
-void RenderMessageFilter::CreateNewWindow(
- mojom::CreateNewWindowParamsPtr params,
- const CreateNewWindowCallback& callback) {
- bool no_javascript_access;
- bool can_create_window = GetContentClient()->browser()->CanCreateWindow(
- render_process_id_, params->opener_render_frame_id, params->opener_url,
- params->opener_top_level_frame_url, params->opener_security_origin,
- params->window_container_type, params->target_url, params->referrer,
- params->frame_name, params->disposition, *params->features,
- params->user_gesture, params->opener_suppressed, resource_context_,
- &no_javascript_access);
-
- mojom::CreateNewWindowReplyPtr reply = mojom::CreateNewWindowReply::New();
- if (!can_create_window) {
- reply->route_id = MSG_ROUTING_NONE;
- reply->main_frame_route_id = MSG_ROUTING_NONE;
- reply->main_frame_widget_route_id = MSG_ROUTING_NONE;
- reply->cloned_session_storage_namespace_id = 0;
- return callback.Run(std::move(reply));
- }
-
- // This will clone the sessionStorage for namespace_id_to_clone.
- scoped_refptr<SessionStorageNamespaceImpl> cloned_namespace =
- new SessionStorageNamespaceImpl(dom_storage_context_.get(),
- params->session_storage_namespace_id);
- reply->cloned_session_storage_namespace_id = cloned_namespace->id();
-
- render_widget_helper_->CreateNewWindow(
- std::move(params), no_javascript_access, &reply->route_id,
- &reply->main_frame_route_id, &reply->main_frame_widget_route_id,
- cloned_namespace.get());
- callback.Run(std::move(reply));
-}
-
void RenderMessageFilter::CreateNewWidget(
int32_t opener_id,
blink::WebPopupType popup_type,

Powered by Google App Engine
This is Rietveld 408576698