Send reply for sync messages when event.returnValue is set.

This commit is contained in:
Cheng Zhao 2013-09-22 09:52:58 +08:00
parent ef4b36d621
commit d443b36446
6 changed files with 70 additions and 16 deletions

View file

@ -353,16 +353,13 @@ void NativeWindow::OnRendererMessage(const string16& channel,
void NativeWindow::OnRendererMessageSync(const string16& channel,
const base::ListValue& args,
IPC::Message* reply_msg) {
string16 json;
AtomBrowserMainParts::Get()->atom_bindings()->OnRendererMessageSync(
GetWebContents()->GetRenderProcessHost()->GetID(),
GetWebContents()->GetRoutingID(),
channel,
args,
&json);
AtomViewHostMsg_Message_Sync::WriteReplyParams(reply_msg, json);
Send(reply_msg);
this,
reply_msg);
}
} // namespace atom