2019-04-02 22:38:16 +00:00
|
|
|
module atom.mojom;
|
|
|
|
|
|
|
|
import "mojo/public/mojom/base/values.mojom";
|
|
|
|
|
|
|
|
interface ElectronRenderer {
|
|
|
|
Message(
|
|
|
|
bool internal,
|
|
|
|
bool send_to_all,
|
|
|
|
string channel,
|
|
|
|
mojo_base.mojom.ListValue arguments,
|
|
|
|
int32 sender_id);
|
|
|
|
|
|
|
|
TakeHeapSnapshot(handle file) => (bool success);
|
|
|
|
};
|
|
|
|
|
|
|
|
interface ElectronBrowser {
|
2019-04-03 21:22:23 +00:00
|
|
|
// Emits an event on |channel| from the ipcMain JavaScript object in the main
|
|
|
|
// process.
|
2019-04-02 22:38:16 +00:00
|
|
|
Message(
|
|
|
|
bool internal,
|
|
|
|
string channel,
|
|
|
|
mojo_base.mojom.ListValue arguments);
|
|
|
|
|
2019-04-03 21:22:23 +00:00
|
|
|
// Emits an event on |channel| from the ipcMain JavaScript object in the main
|
|
|
|
// process, and waits synchronously for a response.
|
|
|
|
//
|
2019-04-02 22:38:16 +00:00
|
|
|
// NB. this is not marked [Sync] because mojo synchronous methods can be
|
|
|
|
// reordered with respect to asynchronous methods on the same channel.
|
|
|
|
// Instead, callers can manually block on the response to this method.
|
|
|
|
MessageSync(
|
|
|
|
bool internal,
|
|
|
|
string channel,
|
|
|
|
mojo_base.mojom.ListValue arguments) => (mojo_base.mojom.Value result);
|
2019-04-03 21:22:23 +00:00
|
|
|
|
|
|
|
// Emits an event from the |ipcRenderer| JavaScript object in the target
|
|
|
|
// WebContents's main frame, specified by |web_contents_id|.
|
|
|
|
MessageTo(
|
|
|
|
bool internal,
|
|
|
|
bool send_to_all,
|
|
|
|
int32 web_contents_id,
|
|
|
|
string channel,
|
|
|
|
mojo_base.mojom.ListValue arguments);
|
|
|
|
|
|
|
|
MessageHost(
|
|
|
|
string channel,
|
|
|
|
mojo_base.mojom.ListValue arguments);
|
2019-04-02 22:38:16 +00:00
|
|
|
};
|