rename use_x11 to ozone_platform_x11

Ozone is default now in Chromium and non-Ozone/X11 (aka use_x11) is
deprecated. During the transition period use_x11 == ozone_platform_x11.

Bug: chromium:1096425
Change-Id: Ie3643360ec6607796533054bdedf8e2bb8e7e749
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231650
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35040}
diff --git a/AUTHORS b/AUTHORS
index 8096282..11da0f4 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -70,6 +70,7 @@
 Manish Jethani <manish.jethani@gmail.com>
 Martin Storsjo <martin@martin.st>
 Matthias Liebig <matthias.gcode@gmail.com>
+Maksim Sisov <msisov@igalia.com>
 Maxim Pavlov <pavllovmax@gmail.com>
 Maxim Potapov <vopatop.skam@gmail.com>
 Michael Iedema <michael@kapsulate.com>
diff --git a/tools_webrtc/mb/mb.py b/tools_webrtc/mb/mb.py
index 45606ff..b0266ac 100755
--- a/tools_webrtc/mb/mb.py
+++ b/tools_webrtc/mb/mb.py
@@ -911,9 +911,8 @@
         cmdline.append('../../tools_webrtc/ensure_webcam_is_running.py')
         extra_files.append('../../tools_webrtc/ensure_webcam_is_running.py')
 
-      # This needs to mirror the settings in //build/config/ui.gni:
-      # use_x11 = is_linux && !use_ozone.
-      use_x11 = is_linux and not 'use_ozone=true' in vals['gn_args']
+      # is_linux uses use_ozone and x11 by default.
+      use_x11 = is_linux
 
       xvfb = use_x11 and test_type == 'windowed_test_launcher'
       if xvfb:
diff --git a/webrtc.gni b/webrtc.gni
index a32e7bf..3d8c538 100644
--- a/webrtc.gni
+++ b/webrtc.gni
@@ -8,9 +8,9 @@
 import("//build/config/arm.gni")
 import("//build/config/features.gni")
 import("//build/config/mips.gni")
+import("//build/config/ozone.gni")
 import("//build/config/sanitizers/sanitizers.gni")
 import("//build/config/sysroot.gni")
-import("//build/config/ui.gni")
 import("//build_overrides/build.gni")
 
 if (!build_with_chromium && is_component_build) {
@@ -124,7 +124,7 @@
   rtc_build_tools = true
 
   # Set this to false to skip building code that requires X11.
-  rtc_use_x11 = use_x11
+  rtc_use_x11 = ozone_platform_x11
 
   # Set this to use PipeWire on the Wayland display server.
   # By default it's only enabled on desktop Linux (excludes ChromeOS) and