Page 1 of 1

Necessity of IPC msgs, when using a process "mediator"?

PostPosted: Mon Dec 19, 2016 2:02 pm
by dmKO
Hi all,

I just recently stumbled upon some thoughts concerning my full understanding of given CEF classes, interfaces and single methods. I'll try to explain them by defining (following below) a minimalistic extension of cefsimple, see here.

Having implemented the RenderProcessHandler, I extended SimpleApp such that it contains attributes for storing a reference to an instance of this RenderProcessHandler and also to an instance of SimpleHandler.
Afaik, SimpleHandler and RenderProcessHandler are supposed to communicate by using IPC messages via calling CefBrowser::SendProcessMessage due to their existence in the browser process (SimpleHandler) and render process (RenderProcessHandler).

1) Now, if you modify both classes such that each of them holds a reference to SimpleApp and you are able to delegate method calls (SimpleHandler <--> SimpleApp <--> RenderProcessHandler) between two different processes without using IPC - which I assumed shouldn't be possible. And where are the advantages in using IPC messages? Encoding and decoding of whole objects into such a message seems to be terrible exhausting.

2) In which process is SimpleApp working? Looking at CefBrowserProcessHandler, whose methods are implemented in SimpleApp, it looks like its part of multiple processes..? Is that the reason for the possible method delegation mentioned in 1)?

Thanks in advance!