exo: Associate exo::SurfaceDelegate with Capabilities
The capability set (described in go/secure-exo-ids) defines a
per-wayland-server configuration which exo uses to modify its behaviour
for different kinds of clients (e.g. exo behaves differently for Arc
clients vs Crostini ones). To implement this we need some way of
annotating exo's classes with the right capability set.
In this CL we annotate the various ShellSurfaceBase implementations with
their capability sets. This set essentially contains all the wayland
objects which might become top-level windows.
The capability set comes via the wayland::Server, so is is convenient to
test this functionality as part of the wayland_client_tests.
Bug: b/231394966
Change-Id: I6423c4931f4a17c37cc0d3eee9f6132cf4ffc968
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3641194
Reviewed-by: Mitsuru Oshima <[email protected]>
Commit-Queue: Nic Hollingum <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1007237}
diff --git a/components/exo/sub_surface.cc b/components/exo/sub_surface.cc
index 510e989..1750936 100644
--- a/components/exo/sub_surface.cc
+++ b/components/exo/sub_surface.cc
@@ -124,6 +124,12 @@
surface_->window()->SetProperty(aura::client::kSkipImeProcessing, true);
}
+Capabilities* SubSurface::GetCapabilities() {
+ if (parent_)
+ return parent_->GetCapabilities();
+ return nullptr;
+}
+
////////////////////////////////////////////////////////////////////////////////
// SurfaceObserver overrides: