How to create a process when browser is starting?

152 views
Skip to first unread message

Биун Аркадьевич

unread,
May 31, 2018, 11:25:09 AM5/31/18
to Chromium-dev
Hi everyone. I need to create my own processes that will do some stuff when browser is launching. I found that in file \src\chrome\browser\chrome_browser_main.cc there is function 
int ChromeBrowserMainParts::PreEarlyInitialization()

and there call another function
  browser_process_ =
     std::make_unique<BrowserProcessImpl>(local_state_task_runner.get());

 so I think if I can implement my own class that inherited from BrowserProcessImpl

I can create as much processes as I want. Is this approach is right? Or if there some Readme file it will be great.

Greg Thompson

unread,
Jun 1, 2018, 6:30:11 AM6/1/18
to biun...@gmail.com, Chromium-dev
BrowserProcessImpl represents the currently running browser process (the one that is starting up). It does not represent some other process that is launched during process startup. You're free to create your own processes any way you like during process startup. base/process/launch.h has helpers for launching processes.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/421760c6-3b16-4fff-ab46-1fd3fe022216%40chromium.org.

Биун Аркадьевич

unread,
Jun 4, 2018, 4:09:56 AM6/4/18
to Chromium-dev
Thank you. But I have one question: Can I start child process using ExtraParts? Are there some documentations? I prefer this way because I think if I will use ExtraParts to start child process it will be easy implement IPC and watchdog.

четверг, 31 мая 2018 г., 22:25:09 UTC+7 пользователь Биун Аркадьевич написал:
Message has been deleted

Greg Thompson

unread,
Jun 6, 2018, 2:11:50 PM6/6/18
to biun...@gmail.com, Chromium-dev
As I said, you're free to create your own processes any way you like during process startup. base/process/launch.h has helpers for launching processes. Have you tried it?

On Mon, Jun 4, 2018, 10:10 AM Биун Аркадьевич <biun...@gmail.com> wrote:
Thank you. But I have one question: Can I start child process using ExtraParts? Are there some documentations? I prefer this way because I think if I will use ExtraParts to start child process it will be easy implement IPC and watchdog.

пятница, 1 июня 2018 г., 17:30:11 UTC+7 пользователь Greg Thompson написал:

Angelo Mantellini

unread,
Jul 5, 2018, 4:41:50 AM7/5/18
to Chromium-dev
Hi,
I want to know how you created the new process inside this main class.
thanks for your help
Reply all
Reply to author
Forward
0 new messages