How to use Mojo ipc between chromium and an cef based application

923 views
Skip to first unread message

Isabella Swift

unread,
Jun 19, 2023, 9:42:27 AM6/19/23
to chromium-mojo
I have a cef based application.
I have some data in renderer folder of chromium code and I want to pass this data to browser process of my cef application.

I want to do it through mojo ipc. That is I want to be able to send a message from renderer process to browser process.

I have referred this document for implementing the same - https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/mojo_and_services.md

Based on this document I have done the implementation as following -
1) The interface example.mojom is in chromium code.
2) sending the data from renderer forlder in chromium using mojo::Remote.
3) binding in cef application code using BindNewPipeAndPassReceiver() and GetBrowserInterfaceBroker()
4) receiving the data in cef code by writing a implementation of the example interface.

The files that are auto-generated by mojom are also present in chromium code.

The problem with this is -
since my interface (example.mojom), pendingReceiver,BinderRegistry are present in chromium code, I need to add a include in cef application.
This causes various linker errors. 

So can someone please help with this scenario. I wanted to understand if the places where I have kept the files is right ?
 
( If I keep the receiver code that is implementation of the example interface in browser folder in chromium then it works fine. But I want to receive data in my cef application directly. )

K. Moon

unread,
Jun 19, 2023, 9:46:36 AM6/19/23
to Isabella Swift, chromium-mojo
I think you'd need to ask this question in a CEF-specific forum, as the problem sounds like a build configuration issue with CEF. (CEF is not part of the Chromium project, despite the name.)

--
You received this message because you are subscribed to the Google Groups "chromium-mojo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-moj...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-mojo/d11f1669-356f-4e52-8dec-a86487ae1e47n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages