feat: MessagePorts in the main process (#22404)

This commit is contained in:
Jeremy Apthorp 2020-03-11 18:07:54 -07:00 committed by GitHub
parent c4c0888972
commit b4d07f76d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 1316 additions and 113 deletions

View file

@ -3,6 +3,7 @@ module electron.mojom;
import "mojo/public/mojom/base/string16.mojom";
import "ui/gfx/geometry/mojom/geometry.mojom";
import "third_party/blink/public/mojom/messaging/cloneable_message.mojom";
import "third_party/blink/public/mojom/messaging/transferable_message.mojom";
interface ElectronRenderer {
Message(
@ -12,6 +13,8 @@ interface ElectronRenderer {
blink.mojom.CloneableMessage arguments,
int32 sender_id);
ReceivePostMessage(string channel, blink.mojom.TransferableMessage message);
UpdateCrashpadPipeName(string pipe_name);
// This is an API specific to the "remote" module, and will ultimately be
@ -53,6 +56,8 @@ interface ElectronBrowser {
string channel,
blink.mojom.CloneableMessage arguments) => (blink.mojom.CloneableMessage result);
ReceivePostMessage(string channel, blink.mojom.TransferableMessage message);
// Emits an event on |channel| from the ipcMain JavaScript object in the main
// process, and waits synchronously for a response.
[Sync]