void ChromeMain::Run() { base::EnableTerminationOnHeapCorruption(); FilePath res_dll; PathService::Get(base::DIR_EXE, &res_dll); res_dll = res_dll.Append(L"wanui_res.dll"); ui::ResourceBundle::InitSharedInstance(res_dll); MessageLoop main_message_loop(MessageLoop::TYPE_UI); process_init(); CmdLineHandler::GetInstance()->handleCmd(); // Show Main Window... Browser* chrome = Browser::Create(); TabContentsWrapper* tabContent = CmdLineHandler::GetInstance()->isLeaderStartWithCmd() ? chrome->AddTabWithGlobalCfg(true) : chrome->AddBlankTab(true); if (tabContent){ chrome->window()->Show(); view::AcceleratorHandler accelerator_handler; MessageLoopForUI::current()->Run(&accelerator_handler); } process_fini(); ui::ResourceBundle::CleanupSharedInstance(); }
void ChromeMain::Run() { base::EnableTerminationOnHeapCorruption(); base::AtExitManager exit_manager; FilePath res_dll; PathService::Get(base::DIR_EXE, &res_dll); res_dll = res_dll.Append(L"wanui_res.dll"); ui::ResourceBundle::InitSharedInstance(res_dll); MessageLoop main_message_loop(MessageLoop::TYPE_UI); // Show Main Window... Browser* chrome = Browser::Create(); chrome->AddBlankTab(true); chrome->window()->Show(); view::AcceleratorHandler accelerator_handler; MessageLoopForUI::current()->Run(&accelerator_handler); ui::ResourceBundle::CleanupSharedInstance(); }