api.mojom 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. module atom.mojom;
  2. import "mojo/public/mojom/base/values.mojom";
  3. interface ElectronRenderer {
  4. Message(
  5. bool internal,
  6. bool send_to_all,
  7. string channel,
  8. mojo_base.mojom.ListValue arguments,
  9. int32 sender_id);
  10. UpdateCrashpadPipeName(string pipe_name);
  11. TakeHeapSnapshot(handle file) => (bool success);
  12. };
  13. interface ElectronBrowser {
  14. // Emits an event on |channel| from the ipcMain JavaScript object in the main
  15. // process.
  16. Message(
  17. bool internal,
  18. string channel,
  19. mojo_base.mojom.ListValue arguments);
  20. // Emits an event on |channel| from the ipcMain JavaScript object in the main
  21. // process, and waits synchronously for a response.
  22. //
  23. // NB. this is not marked [Sync] because mojo synchronous methods can be
  24. // reordered with respect to asynchronous methods on the same channel.
  25. // Instead, callers can manually block on the response to this method.
  26. MessageSync(
  27. bool internal,
  28. string channel,
  29. mojo_base.mojom.ListValue arguments) => (mojo_base.mojom.Value result);
  30. // Emits an event from the |ipcRenderer| JavaScript object in the target
  31. // WebContents's main frame, specified by |web_contents_id|.
  32. MessageTo(
  33. bool internal,
  34. bool send_to_all,
  35. int32 web_contents_id,
  36. string channel,
  37. mojo_base.mojom.ListValue arguments);
  38. MessageHost(
  39. string channel,
  40. mojo_base.mojom.ListValue arguments);
  41. };