当前位置: 首页 > >

chromium启动流程

发布时间:

1:进入ChromeMain()函数,该函数在chromeappchrome_main.cc


2:在ChromeMain()函数中,调用ContentMain(),该函数在contentappcontent_main.cc


3:在ContentMain()中调用int Run(),该函数在contentappcontent_main_runner.cc中


4:在Run()中调用RunNamedProcessTypeMain(),根据命令行参数调用该函数创建其他进程。该函数在contentappcontent_main_runner.cc


int Run() override {
? ? DCHECK(is_initialized_);
? ? DCHECK(!is_shutdown_);
? ? const base::CommandLine& command_line =
? ? ? ? *base::CommandLine::ForCurrentProcess();
? ? std::string process_type =
? ? ? ? command_line.GetSwitchValueASCII(switches::kProcessType);


? ? base::HistogramBase::EnableActivityReportHistogram(process_type);


? ? MainFunctionParams main_params(command_line);
? ? main_params.ui_task = ui_task_;
#if defined(OS_WIN)
? ? main_params.sandbox_info = &sandbox_info_;
#elif defined(OS_MACOSX)
? ? main_params.autorelease_pool = autorelease_pool_.get();
#endif


? ? return RunNamedProcessTypeMain(process_type, main_params, delegate_);
? }



友情链接: