Commit 80e78e5a authored by Maksim Sisov's avatar Maksim Sisov Committed by Commit Bot

X11 and Ozone: cleanup //weblayer for use_x11 && use_ozone build.

Sets touch device list from cmd line only for non-ozone/X11 for now and
also doesn't set x11 error handlers if Ozone is used.

-----

PS: Please note that this is a temp solution that will help to choose
between ozone and non-ozone X11 build. The switch that will be used
to choose the path is --enable-features=UseOzonePlatform. Once
non-Ozone X11 path is removed (hopefully by Q1 2021 depending on how
th finch trial goes), the wrapper will be removed.

Please also note that it's impossible to build use_x11 && use_ozone
without some hacks in PlatformCursor code. The changes to that are
on their way to upstream.

----

Bug: 1085700
Change-Id: Id0520d4c5b66ad7a6b628b09f887c4a65e03d470
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315887
Commit-Queue: Maksim Sisov (GMT+3) <msisov@igalia.com>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791856}
parent 81780b57
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#include "ui/base/x/x11_util.h" // nogncheck #include "ui/base/x/x11_util.h" // nogncheck
#endif #endif
#if defined(USE_AURA) && defined(USE_X11) #if defined(USE_AURA) && defined(USE_X11)
#include "ui/base/ui_base_features.h"
#include "ui/events/devices/x11/touch_factory_x11.h" // nogncheck #include "ui/events/devices/x11/touch_factory_x11.h" // nogncheck
#endif #endif
#if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX) #if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX)
...@@ -130,7 +131,8 @@ int BrowserMainPartsImpl::PreCreateThreads() { ...@@ -130,7 +131,8 @@ int BrowserMainPartsImpl::PreCreateThreads() {
void BrowserMainPartsImpl::PreMainMessageLoopStart() { void BrowserMainPartsImpl::PreMainMessageLoopStart() {
#if defined(USE_AURA) && defined(USE_X11) #if defined(USE_AURA) && defined(USE_X11)
ui::TouchFactory::SetTouchDeviceListFromCommandLine(); if (!features::IsUsingOzonePlatform())
ui::TouchFactory::SetTouchDeviceListFromCommandLine();
#endif #endif
} }
...@@ -138,7 +140,8 @@ int BrowserMainPartsImpl::PreEarlyInitialization() { ...@@ -138,7 +140,8 @@ int BrowserMainPartsImpl::PreEarlyInitialization() {
browser_process_ = std::make_unique<BrowserProcess>(std::move(local_state_)); browser_process_ = std::make_unique<BrowserProcess>(std::move(local_state_));
#if defined(USE_X11) #if defined(USE_X11)
ui::SetDefaultX11ErrorHandlers(); if (!features::IsUsingOzonePlatform())
ui::SetDefaultX11ErrorHandlers();
#endif #endif
#if defined(USE_AURA) && defined(OS_LINUX) #if defined(USE_AURA) && defined(OS_LINUX)
ui::InitializeInputMethodForTesting(); ui::InitializeInputMethodForTesting();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment