2019-06-19 15:23:04 -06:00
|
|
|
module electron.mojom;
|
2019-04-02 16:38:16 -06:00
|
|
|
|
2019-06-12 16:08:22 -06:00
|
|
|
import "mojo/public/mojom/base/string16.mojom";
|
2019-08-02 17:56:46 -06:00
|
|
|
import "ui/gfx/geometry/mojom/geometry.mojom";
|
2019-10-09 11:59:08 -06:00
|
|
|
import "third_party/blink/public/mojom/messaging/cloneable_message.mojom";
|
2020-03-11 19:07:54 -06:00
|
|
|
import "third_party/blink/public/mojom/messaging/transferable_message.mojom";
|
2019-04-02 16:38:16 -06:00
|
|
|
|
|
|
|
interface ElectronRenderer {
|
|
|
|
Message(
|
|
|
|
bool internal,
|
|
|
|
string channel,
|
2019-10-09 11:59:08 -06:00
|
|
|
blink.mojom.CloneableMessage arguments,
|
2023-07-24 06:27:30 -06:00
|
|
|
int32 sender_id,
|
|
|
|
bool sender_is_main_frame);
|
2019-04-02 16:38:16 -06:00
|
|
|
|
2020-03-11 19:07:54 -06:00
|
|
|
ReceivePostMessage(string channel, blink.mojom.TransferableMessage message);
|
|
|
|
|
2019-04-02 16:38:16 -06:00
|
|
|
TakeHeapSnapshot(handle file) => (bool success);
|
|
|
|
};
|
|
|
|
|
2019-06-12 16:08:22 -06:00
|
|
|
interface ElectronAutofillAgent {
|
|
|
|
AcceptDataListSuggestion(mojo_base.mojom.String16 value);
|
|
|
|
};
|
|
|
|
|
2019-08-19 14:13:24 -06:00
|
|
|
interface ElectronAutofillDriver {
|
|
|
|
ShowAutofillPopup(gfx.mojom.RectF bounds, array<mojo_base.mojom.String16> values, array<mojo_base.mojom.String16> labels);
|
|
|
|
HideAutofillPopup();
|
|
|
|
};
|
|
|
|
|
2019-06-03 11:43:04 -06:00
|
|
|
struct DraggableRegion {
|
|
|
|
bool draggable;
|
|
|
|
gfx.mojom.Rect bounds;
|
|
|
|
};
|
|
|
|
|
2022-03-18 20:50:05 -06:00
|
|
|
interface ElectronWebContentsUtility {
|
|
|
|
// Informs underlying WebContents that first non-empty layout was performed
|
|
|
|
// by compositor.
|
|
|
|
OnFirstNonEmptyLayout();
|
|
|
|
|
|
|
|
UpdateDraggableRegions(
|
|
|
|
array<DraggableRegion> regions);
|
|
|
|
|
|
|
|
SetTemporaryZoomLevel(double zoom_level);
|
|
|
|
|
|
|
|
[Sync]
|
|
|
|
DoGetZoomLevel() => (double result);
|
|
|
|
};
|
|
|
|
|
|
|
|
interface ElectronApiIPC {
|
2019-04-03 15:22:23 -06:00
|
|
|
// Emits an event on |channel| from the ipcMain JavaScript object in the main
|
|
|
|
// process.
|
2019-04-02 16:38:16 -06:00
|
|
|
Message(
|
|
|
|
bool internal,
|
|
|
|
string channel,
|
2019-10-09 11:59:08 -06:00
|
|
|
blink.mojom.CloneableMessage arguments);
|
2019-04-02 16:38:16 -06:00
|
|
|
|
2019-05-31 11:25:19 -06:00
|
|
|
// Emits an event on |channel| from the ipcMain JavaScript object in the main
|
|
|
|
// process, and returns the response.
|
|
|
|
Invoke(
|
2019-08-23 16:45:50 -06:00
|
|
|
bool internal,
|
2019-05-31 11:25:19 -06:00
|
|
|
string channel,
|
2019-10-09 11:59:08 -06:00
|
|
|
blink.mojom.CloneableMessage arguments) => (blink.mojom.CloneableMessage result);
|
2019-05-31 11:25:19 -06:00
|
|
|
|
2020-03-11 19:07:54 -06:00
|
|
|
ReceivePostMessage(string channel, blink.mojom.TransferableMessage message);
|
|
|
|
|
2019-04-03 15:22:23 -06:00
|
|
|
// Emits an event on |channel| from the ipcMain JavaScript object in the main
|
|
|
|
// process, and waits synchronously for a response.
|
2019-12-17 12:35:28 -07:00
|
|
|
[Sync]
|
2019-04-02 16:38:16 -06:00
|
|
|
MessageSync(
|
|
|
|
bool internal,
|
|
|
|
string channel,
|
2019-10-09 11:59:08 -06:00
|
|
|
blink.mojom.CloneableMessage arguments) => (blink.mojom.CloneableMessage result);
|
2019-04-03 15:22:23 -06:00
|
|
|
|
|
|
|
// Emits an event from the |ipcRenderer| JavaScript object in the target
|
|
|
|
// WebContents's main frame, specified by |web_contents_id|.
|
|
|
|
MessageTo(
|
|
|
|
int32 web_contents_id,
|
|
|
|
string channel,
|
2019-10-09 11:59:08 -06:00
|
|
|
blink.mojom.CloneableMessage arguments);
|
2019-04-03 15:22:23 -06:00
|
|
|
|
|
|
|
MessageHost(
|
|
|
|
string channel,
|
2019-10-09 11:59:08 -06:00
|
|
|
blink.mojom.CloneableMessage arguments);
|
2019-04-02 16:38:16 -06:00
|
|
|
};
|