Hi all.
Since mid January, Igalia has been working on a project whose goal was 
to make the latest Chromium browser capable of running on top of the 
Ozone backends suitable for Linux desktop environments.
https://github.com/Igalia/chromium/tree/ozone-wayland-dev#chromium-for-wayland
Note that some attempts were taken to add Wayland support to Chromium 
previously [0]. Although it had a good community support and results, it 
got stalled and the latest officially supported Chromium baseline was m49.
Additionally, the way Ozone/Wayland tackled the problem was by extending 
the classes responsible for desktop integration 
(//ui/views/widget/desktop_aura/) with a Wayland implementation, sibling 
to the existing X11 and Windows supports.
This new effort extends the existing Mus machinery in a way that 
Chromium can be executed on non-ChromeOS environments without any 
functionality loss when compared to regular Linux/X11 Chromium builds.
Additionally, the project is based on the idea of keeping the Chromium 
baseline always as close as possible to upstream development, as well as 
aligned with Google's own plans.
UI service and Ozone
----------------------
Ozone [1] is an abstraction layer underneath the UI Service - aka Mus. 
It aims to abstract away windowing, graphics and input handling details 
from its upper layers, using a well defined set of interfaces. The Mus + 
Ozone combination allows Mus to run on top of various graphics backends 
Ozone supports - namely DRM/GBM, X11, Wayland and Headless.
In that context, the mus+ash project [2] makes it possible to launch the 
Ash desktop environment on top of Mus. Today, for instance, 
Ozone/ChromeOS builds of Chrome are supported, and this new setup can be 
trigerred by passing either --mash or --mus parameters.
$ <out>/chrome --mash --ozone-platform={x11 | wayland | etc} 
--user-data-dir=~/tmp
Or
$ <out>/chrome --mus --ozone-platform={x11 | wayland | etc} 
--user-data-dir=~/tmp
The above commands launch the "mash" environment, a ChromeOS oriented 
Window Manager for applications (including the Chrome browser itself) to 
run in what we have been calling "internal window" mode. In this mode, 
applications do not "talk" directly to the host Window Manager. Instead, 
all windowing management is handled by the Mash Window Manager and 
Aura/Mus - see the screenshot [3] below for reference - and all the aura 
windows in the system end up sharing a single display.
[0] 
https://github.com/01org/ozone-wayland
[1] 
https://chromium.googlesource.com/chromium/src/+/master/docs/ozone_overview.md
[2] 
https://www.chromium.org/developers/mus-ash
[3] 
https://people.igalia.com/agomes/mus+ash/chrome_mash_ozone_x11_may08.png
External window mode support
-----------------------------
In order to make the Chromium browser to be capable of launching on 
Ozone/LinuxOS targets, both Mus and Ozone are needed to be extended to 
launch Chromium in "external window mode", a regular desktop application 
similar to the exiting Linux/X11 Chromium builds (kudos rjkroege@ for 
the terminology here :).
Thanks to the way Ozone is implemented, adding "external window mode" 
support to Mus allows us to precisely meet our primarily goal: make it 
possible to run the same Chromium browser binary natively one either X11 
or Wayland based environments, through Ozone.
The project
-----------
In order to expedite a working prototype, we decided to host the project 
on GitHub [4], but the ideal goal is to upstream the work once current 
upstream priorities regarding Mash stabilize. Please see the details 
about how to build/run in [4].
Today's project snapshot [5][6], for instance, runs on top of Chromium 
ToT as of (May/15) - see also details about rebase strategy in [4]. To 
put it short, we rebase against ToT on a weekly basis.
[4] 
https://github.com/Igalia/chromium/tree/ozone-wayland-dev#chromium-for-wayland
[5] 
https://www.youtube.com/watch?v=tb027dDkg7E
[6] 
https://www.youtube.com/watch?v=D6jAucPocmg
Comments welcome,
Contacts:
Antonio Gomes <
toni...@igalia.com>
Maksim Sisov <
msi...@igalia.com>
Frédéric Wang <
fw...@igalia.com>
-
Antonio