New issue
Advanced search Search tips

Issue 883947 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Make it possible for the environment hosting window-service to provide specific interfaces

Project Member Reported by sky@chromium.org, Sep 13

Issue description

We currently have PerformWmAction, which allows passing a window an arbitrary string action. A better approach would be allow the local environment to expose *any* associated interface it wants. The interface needs to be associated so that there aren't any ordering issues.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/17634600aaee1647ad9ff117f512e36698edf6fc

commit 17634600aaee1647ad9ff117f512e36698edf6fc
Author: Scott Violet <sky@chromium.org>
Date: Thu Sep 13 21:20:17 2018

chromeos: ash test changes

Makes AshTestHelper supply a test GpuInterfaceProvider. The test version queues
up the requests and never binds them. This way, any code requesting an interface
doesn't get a closed pipe and do something weird.

This also makes TearDown() reset the context factory and context factory
private on Env. This is important as aura::Env is often created in the test
suite and long lived, where as AshTestHelper creates the factories.

BUG= 883947 
TEST=none

Change-Id: Ie2746e21562235e9ec9142a7a5dc7d856029ba57
Reviewed-on: https://chromium-review.googlesource.com/1225595
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591161}
[modify] https://crrev.com/17634600aaee1647ad9ff117f512e36698edf6fc/ash/BUILD.gn
[modify] https://crrev.com/17634600aaee1647ad9ff117f512e36698edf6fc/ash/test/ash_test_helper.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Sep 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7443df410851d038bcf9265bee594f3f4d265cb4

commit 7443df410851d038bcf9265bee594f3f4d265cb4
Author: Scott Violet <sky@chromium.org>
Date: Fri Sep 14 19:52:58 2018

chromeos: moves PerformWmAction to a more specific function

PerformWmAction was provided as a way to have the window manager perform an
action not known to the window service. The window-service defined this api
so that a window's id could be passed, which is unique to the client. A
more generic approach is to allow the environment hosting the window service
to supply arbitrary associated interfaces that are not known to the window
service. It's important the interface is associated so that we can know the
ordering. That's what this patch does.

This adds WindowTree::BindWindowManagerInterface() that takes a name and handle.
The name is the name of the interface (every mojom interface has a name).
The function is typed to associated WindowManager& window_manager, but that is
just a necessity of the mojom. It's used to request *any* interface. In fact
requesting ws::mojom::WindowManager won't work at all. An interface needs to
be named here as there is no way in a mojom to say *any* associated interface.

This also converts the one use of PerformWmAction to an interface defined by
ash, AshWindowManager.

BUG= 883947 
TEST=covered by tests

Change-Id: I21870a1d173352b596716cd1a807b591385f8a2b
Reviewed-on: https://chromium-review.googlesource.com/1225693
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Jun Mukai <mukai@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591439}
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ash/BUILD.gn
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ash/public/interfaces/BUILD.gn
[add] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ash/public/interfaces/ash_window_manager.mojom
[delete] https://crrev.com/e3469424bb4f6cf771cd150d22dd54c4e7d74c0b/ash/public/interfaces/window_actions.mojom
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ash/wm/tablet_mode/tablet_mode_window_manager.cc
[add] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ash/ws/ash_window_manager.cc
[add] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ash/ws/ash_window_manager.h
[add] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ash/ws/ash_window_manager_unittest.cc
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ash/ws/window_service_delegate_impl.cc
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ash/ws/window_service_delegate_impl.h
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/services/ws/BUILD.gn
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/services/ws/OWNERS
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/services/ws/public/mojom/window_tree.mojom
[add] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/services/ws/test_wm.mojom
[add] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/services/ws/window_manager_interface.h
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/services/ws/window_service_delegate.cc
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/services/ws/window_service_delegate.h
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/services/ws/window_service_unittest.cc
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/services/ws/window_tree.cc
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/services/ws/window_tree.h
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ui/aura/mus/window_port_mus.h
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ui/aura/mus/window_tree_client.cc
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ui/aura/mus/window_tree_client.h
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ui/aura/mus/window_tree_host_mus.cc
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ui/aura/mus/window_tree_host_mus.h
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ui/aura/mus/window_tree_host_mus_delegate.h
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ui/aura/mus/window_tree_host_mus_unittest.cc
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ui/aura/test/env_test_helper.h
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ui/aura/test/mus/test_window_tree.cc
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ui/aura/test/mus/test_window_tree.h
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ui/aura/test/mus/window_tree_client_private.cc
[modify] https://crrev.com/7443df410851d038bcf9265bee594f3f4d265cb4/ui/aura/test/mus/window_tree_client_private.h

Status: Fixed (was: Started)
Cc: sky@chromium.org
 Issue 869210  has been merged into this issue.
 Issue 869208  has been merged into this issue.

Sign in to add a comment