Inter-process comm: browser-to-browser, browser-to-main

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Inter-process comm: browser-to-browser, browser-to-main

Postby HarmlessDave » Wed Jul 23, 2014 6:43 pm

I've read general usage, searched here and poked around in the cefclient and CEF3 source but can't find anything on IPC except for browser-to/from-render for the same window.

My use case is a Windows tabbed interface browser, so a single host window in the main process would have a tab control and toolbar. Each browser window would be a child, hidden if they are an inactive tab.

I can do some, maybe even all IPC using Windows messages but before I reinvent too many wheels I was wondering:

- Is there a variable set for sub-processes that is the process ID of the main process?
- Is there any IPC support in CEF3 for sending messages between browser objects / processes?

For example, one browser object might want to tell the main process to enable or disable buttons on the toolbar, or send other state information.
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: Inter-process comm: browser-to-browser, browser-to-main

Postby magreenblatt » Tue Jul 29, 2014 10:01 am

magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Inter-process comm: browser-to-browser, browser-to-main

Postby HarmlessDave » Thu Jul 31, 2014 1:53 pm

Thanks, but I must be missing something -- that only seems to allow IPC between one matched pair of browser, render processes not between 2 browser processes:

public virtual bool SendProcessMessage( CefProcessId target_process, CefRefPtr< CefProcessMessage > message )= 0;
typedef cef_process_id_t CefProcessId;
public typedef enum {///// Browser process./// PID_BROWSER,///// Renderer process./// PID_RENDERER, } cef_process_id_t;

Are you suggesting that I clone or hack the CEF source to allow using other process IDs?
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm

Re: Inter-process comm: browser-to-browser, browser-to-main

Postby magreenblatt » Tue Aug 05, 2014 5:01 am

The browser process and the main process are the same process. There are then multiple render processes that communicate with the single browser process.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Inter-process comm: browser-to-browser, browser-to-main

Postby HarmlessDave » Tue Aug 05, 2014 5:53 pm

Ah, thanks, that's what I missed -- only 1 browser process. I saw 2 sub-processes being created for each popup window and thought that was 1 browser, 1 render process.
HarmlessDave
Expert
 
Posts: 370
Joined: Fri Jul 11, 2014 2:02 pm


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 26 guests