Linux: Add multi-threaded message loop support (issue #2512)

This commit is contained in:
Marshall Greenblatt
2018-09-20 06:00:14 -07:00
parent c7d187a512
commit 8aa4b7aaae
31 changed files with 1070 additions and 252 deletions

View File

@ -29,6 +29,7 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/common/content_switches.h"
#include "services/service_manager/embedder/main.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_switches.h"
#if defined(OS_WIN)
@ -356,7 +357,7 @@ bool CefContext::Initialize(const CefMainArgs& args,
init_thread_id_ = base::PlatformThread::CurrentId();
settings_ = settings;
#if !defined(OS_WIN)
#if !(defined(OS_WIN) || defined(OS_LINUX))
if (settings.multi_threaded_message_loop) {
NOTIMPLEMENTED() << "multi_threaded_message_loop is not supported.";
return false;
@ -539,6 +540,8 @@ void CefContext::FinishShutdownOnUIThread(
static_cast<ChromeBrowserProcessStub*>(g_browser_process)->Shutdown();
ui::ResourceBundle::GetSharedInstance().CleanupOnUIThread();
if (uithread_shutdown_event)
uithread_shutdown_event->Signal();
}

View File

@ -104,6 +104,7 @@ CefWindowX11::CefWindowX11(CefRefPtr<CefBrowserHostImpl> browser,
InputOutput,
CopyFromParent, // visual
CWBackPixmap | CWOverrideRedirect, &swa);
CHECK(xwindow_);
if (ui::PlatformEventSource::GetInstance())
ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this);