How to start "Chrome" (or equivalent) as a thread instead of process?


We have an app, which is written in Qt/C++. Its GUI is in Html/Css/JS.

The app works well on the Chrome & Edge. On desktops, the app invokes the OS browser as a separate process. The browser connects via Websocket to the app and exchange the messages for the display purposes. This works well.

However, this doesn’t work in the mobiles. Because invoking a browser as a separate process, would send the actual app to background in Android & iOS.
Now many answers on SO suggests to use the mobile webview, which comes built-in. But, the Webview in Android doesn’t fulfill all the requirements in all the devices. And the iOS Webview is simply substandard & weak.

Question: Is there a way to start any chrome-like browser as a thread of the app itself?

The intention is to keep the app in the foreground without compromising on the Webview limitations. Fine with source code integration & compilation, if required.

Source: Ios

Categorised as android, browser, c++, ios, qt


Web engines are the the driving bodies for how a browser runs. As chrome is based on chromium web engine you need to modify the engine accordingly.

Chrome uses process for each tab while Firefox uses a thread instead.

Chrome architecture has two main processes Browser Process and Renderer Process. Browser UI is running in Browser Process and When you open new tab in Chrome browser, for each tab a new process is gets created called as Renderer Process. Renderer process handles rendering of your HTML contents.

Suppose you have opened 10 tabs in your chrome which leads to creation of 10 Renderer process and 1 browser process.

Why separate Renderer process for each tab ?

Suppose at any point of time while browsing through internet because of some reason some tab crashed, then only that renderer process gets killed and other process are still alive. Your 9 tabs are still responsive and working.
As browser UI is running in different process. Browser UI wont get hanged in general and its responsive enough.
As each renderer is running as different process, shared data access is difficult(thread can access shared data) which provides inter tab data security.
There are many other process running on and having there own purpose.

Name Wilderman

Leave a Reply

Your email address will not be published. Required fields are marked *

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us