lacros: Fix window stacking for select file dialogs
Select file dialogs are implemented in ash-chrome via SelectFileDialogExtension, which requires an aura::Window owning window for the dialog. Top-level windows in lacros-chrome are represented in ash-chrome via ShellSurface objects. Pass an ID for the shell surface over mojo from lacros-chrome to ash-chrome and use it for window parenting. The ID is a string: "org.chromium.lacros.<unguessable-token>", e.g. "org.chromium.lacros.8B93BD96131616984961C7790B5E9A62". Lacros creates an ID for each WaylandToplevelWindow and uses xdg_shell's set_app_id method to set it. This is similar to how ARC++ encodes an Android task ID in the app ID, e.g. "org.chromium.arc.12345". The ID is sent as a string to provide future flexibility (in case we need to encode different window types, like "lacros_popup") and because it felt like an appropriate return type for the cross-platform method ui::PlatformWindow::GetInternalWindowId(). Feature design doc at go/lacros-select-file Bug: 1090587 Test: multiple simultaneous file open dialogs spawn/stack/close correctly Change-Id: I7b2cdb934480f72f5dbb3523922d30cf5df0376a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2301119 Commit-Queue: James Cook <jamescook@chromium.org> Reviewed-by:Sadrul Chowdhury <sadrul@chromium.org> Reviewed-by:
Robert Kroeger <rjkroege@chromium.org> Reviewed-by:
Mitsuru Oshima <oshima@chromium.org> Reviewed-by:
Luciano Pacheco <lucmult@chromium.org> Reviewed-by:
Erik Chen <erikchen@chromium.org> Reviewed-by:
Jorge Lucangeli Obes <jorgelo@chromium.org> Cr-Commit-Position: refs/heads/master@{#791992}
Showing
Please register or sign in to comment