Chromium Code Reviews| Index: ash/mus/window_manager_application.cc |
| diff --git a/ash/mus/window_manager_application.cc b/ash/mus/window_manager_application.cc |
| index f55521a3a10bde17d55141b2c6478528e36c600f..f5872211858defa20b4c0a52ac10d4b21263c9b9 100644 |
| --- a/ash/mus/window_manager_application.cc |
| +++ b/ash/mus/window_manager_application.cc |
| @@ -11,6 +11,7 @@ |
| #include "ash/mus/accelerators/accelerator_registrar_impl.h" |
| #include "ash/mus/native_widget_factory_mus.h" |
| #include "ash/mus/shelf_delegate_mus.h" |
| +#include "ash/mus/system_tray_delegate_mus.h" |
| #include "ash/mus/wallpaper_delegate_mus.h" |
| #include "ash/mus/window_manager.h" |
| #include "base/bind.h" |
| @@ -155,6 +156,7 @@ void WindowManagerApplication::OnStart(const shell::Identity& identity) { |
| bool WindowManagerApplication::OnConnect(const shell::Identity& remote_identity, |
| shell::InterfaceRegistry* registry) { |
| registry->AddInterface<ash::mojom::ShelfController>(this); |
| + registry->AddInterface<ash::mojom::SystemTray>(this); |
| registry->AddInterface<ash::mojom::WallpaperController>(this); |
| registry->AddInterface<ui::mojom::AcceleratorRegistrar>(this); |
| if (remote_identity.name() == "mojo:mash_session") { |
| @@ -174,6 +176,14 @@ void WindowManagerApplication::Create( |
| shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); |
| } |
| +void WindowManagerApplication::Create(const shell::Identity& remote_identity, |
| + ash::mojom::SystemTrayRequest request) { |
| + ash::mojom::SystemTray* system_tray = static_cast<SystemTrayDelegateMus*>( |
|
sky
2016/09/19 23:47:52
This cast makes me nervous. Could you cache the Sy
James Cook
2016/09/20 01:52:11
How's this? I looked at caching the pointer, but i
|
| + WmShell::Get()->system_tray_delegate()); |
| + DCHECK(system_tray); |
| + system_tray_bindings_.AddBinding(system_tray, std::move(request)); |
| +} |
| + |
| void WindowManagerApplication::Create( |
| const ::shell::Identity& remote_identity, |
| ash::mojom::WallpaperControllerRequest request) { |