Add the ability for the window manager to provide interfaces for a specific window |
|||
Issue description
There are a number of cases where client code wants the window manager to perform a window manager specific operation. For example, snap a window to the left. We should expose a way for clients to do this in such a way that mus isn't exposed to the interface and that doesn't require exposing a global window id.
To do this we should add the following to WindowTree:
// Requests a window manager specific interface for |window_id|. The interface
// that is created acts on |window_id|. |window_id| must identify a window
// created by way of NewTopLevelWindow(), otherwise the operation fails and
// the pipe is disconnected. |interface_name| names the interface.
BindWindowManagerInterface(uint32 window_id,
string interface_name,
handle<message_pipe> interface_pipe);
WindowPortMus would expose a function that ends up calling this on WindowTreeClient.
WindowTree's implementation would have the necessary security checks and then call to the WindowManager (assuming the operation is allowed).
And to WindowManager:
// Called when a client requests an window manager specific interface. See
// WindowTree::BindWindowManagerInterface() for details.
OnBindWindowManagerInterface(uint32 window_id,
string interface_name,
handle<message_pipe> interface_pipe);
WindowTreeClient would implement this and call through to WindowManagerDelegate.
It's entirely possible we'll want to generalize this for other cases beyond the window manager, but this should solve the immediate problems.
,
Nov 1 2017
Certainly. We could provide a registry for the LOCAL case that ash calls into, and put the BindWindowManagerInterface() function on aura::Window. That way the same thing should work in both cases.
,
Mar 9 2018
Un-cc-ing me from all bugs on my final day.
,
Apr 24 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by jamescook@chromium.org
, Nov 1 2017