/
api.mojom
76 lines (61 loc) · 1.99 KB
/
api.mojom
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
module electron.mojom;
import "mojo/public/mojom/base/string16.mojom";
import "ui/gfx/geometry/mojom/geometry.mojom";
import "electron/shell/common/api/native_types.mojom";
import "mojo/public/mojom/base/values.mojom";
interface ElectronRenderer {
Message(
bool internal,
bool send_to_all,
string channel,
LegacyListValue arguments,
int32 sender_id);
UpdateCrashpadPipeName(string pipe_name);
TakeHeapSnapshot(handle file) => (bool success);
};
interface ElectronAutofillAgent {
AcceptDataListSuggestion(mojo_base.mojom.String16 value);
};
struct DraggableRegion {
bool draggable;
gfx.mojom.Rect bounds;
};
interface ElectronBrowser {
// Emits an event on |channel| from the ipcMain JavaScript object in the main
// process.
Message(
bool internal,
string channel,
LegacyListValue arguments);
// Emits an event on |channel| from the ipcMain JavaScript object in the main
// process, and returns the response.
Invoke(
string channel,
LegacyListValue arguments) => (LegacyListValue result);
// Emits an event on |channel| from the ipcMain JavaScript object in the main
// process, and waits synchronously for a response.
[Sync]
MessageSync(
bool internal,
string channel,
LegacyListValue arguments) => (LegacyListValue result);
// 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,
LegacyListValue arguments);
MessageHost(
string channel,
LegacyListValue arguments);
UpdateDraggableRegions(
array<DraggableRegion> regions);
SetTemporaryZoomLevel(double zoom_level);
[Sync]
DoGetZoomLevel() => (double result);
// TODO: move these into a separate interface
ShowAutofillPopup(gfx.mojom.RectF bounds, array<mojo_base.mojom.String16> values, array<mojo_base.mojom.String16> labels);
HideAutofillPopup();
};