api.mojom 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. module electron.mojom;
  2. import "mojo/public/mojom/base/string16.mojom";
  3. import "ui/gfx/geometry/mojom/geometry.mojom";
  4. import "third_party/blink/public/mojom/messaging/cloneable_message.mojom";
  5. import "third_party/blink/public/mojom/messaging/transferable_message.mojom";
  6. interface ElectronRenderer {
  7. Message(
  8. bool internal,
  9. string channel,
  10. blink.mojom.CloneableMessage arguments);
  11. ReceivePostMessage(string channel, blink.mojom.TransferableMessage message);
  12. TakeHeapSnapshot(handle file) => (bool success);
  13. };
  14. interface ElectronAutofillAgent {
  15. AcceptDataListSuggestion(mojo_base.mojom.String16 value);
  16. };
  17. interface ElectronAutofillDriver {
  18. ShowAutofillPopup(gfx.mojom.RectF bounds, array<mojo_base.mojom.String16> values, array<mojo_base.mojom.String16> labels);
  19. HideAutofillPopup();
  20. };
  21. interface ElectronWebContentsUtility {
  22. // Informs underlying WebContents that first non-empty layout was performed
  23. // by compositor.
  24. OnFirstNonEmptyLayout();
  25. SetTemporaryZoomLevel(double zoom_level);
  26. [Sync]
  27. DoGetZoomLevel() => (double result);
  28. };
  29. interface ElectronApiIPC {
  30. // Emits an event on |channel| from the ipcMain JavaScript object in the main
  31. // process.
  32. Message(
  33. bool internal,
  34. string channel,
  35. blink.mojom.CloneableMessage arguments);
  36. // Emits an event on |channel| from the ipcMain JavaScript object in the main
  37. // process, and returns the response.
  38. Invoke(
  39. bool internal,
  40. string channel,
  41. blink.mojom.CloneableMessage arguments) => (blink.mojom.CloneableMessage result);
  42. ReceivePostMessage(string channel, blink.mojom.TransferableMessage message);
  43. // Emits an event on |channel| from the ipcMain JavaScript object in the main
  44. // process, and waits synchronously for a response.
  45. [Sync]
  46. MessageSync(
  47. bool internal,
  48. string channel,
  49. blink.mojom.CloneableMessage arguments) => (blink.mojom.CloneableMessage result);
  50. MessageHost(
  51. string channel,
  52. blink.mojom.CloneableMessage arguments);
  53. };