New issue
Advanced search Search tips

Issue 780493 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Add the ability for the window manager to provide interfaces for a specific window

Project Member Reported by sky@chromium.org, Nov 1 2017

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.
 
Could this be built in such a way that code in the browser under classic ash could request the per-window interface and use it? It would be nice to just have one code path for browser code.

Comment 2 by sky@chromium.org, 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.

Comment 3 by e...@chromium.org, Mar 9 2018

Cc: -e...@chromium.org
Un-cc-ing me from all bugs on my final day.
Components: Internals>Services>Ash Internals>Services>WindowService
Labels: -Proj-Mustash-Mus

Sign in to add a comment