Service CreateNewWindow on the UI thread with a new mojo interface

https://codereview.chromium.org/2821473002
This commit is contained in:
Aleksei Kuzmin 2017-08-05 00:38:06 +03:00 committed by Cheng Zhao
parent b81ae1c36f
commit ee9a547985
4 changed files with 8 additions and 15 deletions

View file

@ -656,14 +656,11 @@ void App::OnCreateWindow(
WindowOpenDisposition disposition,
const std::vector<std::string>& features,
const scoped_refptr<content::ResourceRequestBody>& body,
int render_process_id,
int render_frame_id) {
content::RenderFrameHost* opener) {
v8::Locker locker(isolate());
v8::HandleScope handle_scope(isolate());
content::RenderFrameHost* rfh =
content::RenderFrameHost::FromID(render_process_id, render_frame_id);
content::WebContents* web_contents =
content::WebContents::FromRenderFrameHost(rfh);
content::WebContents::FromRenderFrameHost(opener);
if (web_contents) {
auto api_web_contents = WebContents::CreateFrom(isolate(), web_contents);
api_web_contents->OnCreateWindow(target_url,