Add webContents.sendToAll to send message to all frames

This commit is contained in:
Cheng Zhao 2016-05-27 16:58:49 +09:00
parent c1facec5a6
commit 9ab76fb884
7 changed files with 58 additions and 18 deletions

View file

@ -30,7 +30,8 @@ IPC_SYNC_MESSAGE_ROUTED2_1(AtomViewHostMsg_Message_Sync,
base::ListValue /* arguments */,
base::string16 /* result (in JSON) */)
IPC_MESSAGE_ROUTED2(AtomViewMsg_Message,
IPC_MESSAGE_ROUTED3(AtomViewMsg_Message,
bool /* send_to_all */,
base::string16 /* channel */,
base::ListValue /* arguments */)

View file

@ -35,7 +35,7 @@ void RemoteCallbackFreer::RunDestructor() {
base::ASCIIToUTF16("ELECTRON_RENDERER_RELEASE_CALLBACK");
base::ListValue args;
args.AppendInteger(object_id_);
Send(new AtomViewMsg_Message(routing_id(), channel, args));
Send(new AtomViewMsg_Message(routing_id(), false, channel, args));
Observe(nullptr);
}