#include "ewk_global_data.h"
+#include "base/base_switches.h"
#include "base/cpu.h"
+#include "base/feature_list.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "browser/autofill/personal_data_manager_factory.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/browser/renderer_host/render_process_host_impl.h"
+#include "content/browser/scheduler/browser_task_executor.h"
+#include "content/browser/startup_helper.h"
#include "content/browser/utility_process_host.h"
#include "content/gpu/in_process_gpu_thread.h"
#include "content/public/app/content_main.h"
} // namespace
EwkGlobalData::EwkGlobalData()
- : content_main_runner_(ContentMainRunner::Create()),
- browser_main_runner_(BrowserMainRunner::Create()) {}
+ : content_main_runner_(ContentMainRunner::Create()) {}
EwkGlobalData::~EwkGlobalData() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
ui::OzonePlatform::InitializeForUI(init_params);
#endif
+ const base::CommandLine* command_line =
+ base::CommandLine::ForCurrentProcess();
+ base::FeatureList::InitializeInstance(
+ command_line->GetSwitchValueASCII(switches::kEnableFeatures),
+ command_line->GetSwitchValueASCII(switches::kDisableFeatures));
+
+ // Start TaskScheduler before creating BrowserMainLoop.
+ base::TaskScheduler::Create("Browser");
+ content::StartBrowserTaskScheduler();
+ content::BrowserTaskExecutor::Create();
+
+ instance_->browser_main_runner_ = BrowserMainRunner::Create();
instance_->browser_main_runner_->Initialize(main_funtion_params);
base::ThreadRestrictions::SetIOAllowed(true);