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

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

Issue 2363573002: Move ViewHostMsg_CreateWindow to mojom (Closed)
Patch Set: . Created 4 years, 3 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_widget_helper.cc
diff --git a/content/browser/renderer_host/render_widget_helper.cc b/content/browser/renderer_host/render_widget_helper.cc
index e6a225c7ab3c47985b6c5e2d1d317430d5811f75..fce786a8ccae10e00b86b151a5d429a7b6b879c2 100644
--- a/content/browser/renderer_host/render_widget_helper.cc
+++ b/content/browser/renderer_host/render_widget_helper.cc
@@ -88,14 +88,14 @@ void RenderWidgetHelper::OnResumeDeferredNavigation(
}
void RenderWidgetHelper::CreateNewWindow(
- const ViewHostMsg_CreateWindow_Params& params,
+ mojom::CreateNewWindowParamsPtr params,
bool no_javascript_access,
base::ProcessHandle render_process,
int32_t* route_id,
int32_t* main_frame_route_id,
int32_t* main_frame_widget_route_id,
SessionStorageNamespace* session_storage_namespace) {
- if (params.opener_suppressed || no_javascript_access) {
+ if (params->opener_suppressed || no_javascript_access) {
// If the opener is supppressed or script access is disallowed, we should
// open the window in a new BrowsingInstance, and thus a new process. That
// means the current renderer process will not be able to route messages to
@@ -121,23 +121,25 @@ void RenderWidgetHelper::CreateNewWindow(
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
- base::Bind(&RenderWidgetHelper::OnCreateWindowOnUI, this, params,
- *route_id, *main_frame_route_id, *main_frame_widget_route_id,
+ base::Bind(&RenderWidgetHelper::OnCreateWindowOnUI, this,
+ base::Passed(&params), *route_id, *main_frame_route_id,
+ *main_frame_widget_route_id,
base::RetainedRef(session_storage_namespace)));
}
void RenderWidgetHelper::OnCreateWindowOnUI(
- const ViewHostMsg_CreateWindow_Params& params,
+ mojom::CreateNewWindowParamsPtr params,
int32_t route_id,
int32_t main_frame_route_id,
int32_t main_frame_widget_route_id,
SessionStorageNamespace* session_storage_namespace) {
RenderViewHostImpl* host =
- RenderViewHostImpl::FromID(render_process_id_, params.opener_id);
- if (host)
+ RenderViewHostImpl::FromID(render_process_id_, params->opener_id);
+ if (host) {
host->CreateNewWindow(route_id, main_frame_route_id,
- main_frame_widget_route_id, params,
+ main_frame_widget_route_id, *params,
session_storage_namespace);
+ }
}
void RenderWidgetHelper::CreateNewWidget(int opener_id,
« no previous file with comments | « content/browser/renderer_host/render_widget_helper.h ('k') | content/browser/security_exploit_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698