Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1969)

Unified Diff: ash/mus/window_manager_application.cc

Issue 2323063003: mash: Port sysui's WallpaperDelegateMus to mojo:ash. (Closed)
Patch Set: Alternative display info workaround. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/mus/window_manager_application.cc
diff --git a/ash/mus/window_manager_application.cc b/ash/mus/window_manager_application.cc
index 614722a09855dfa1c52b67590b40248fdbe1bb0c..de0f9426ee95195896eef30466914f34833ffcee 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/wallpaper_delegate_mus.h"
#include "ash/mus/window_manager.h"
#include "base/bind.h"
#include "base/memory/ptr_util.h"
@@ -152,6 +153,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::WallpaperController>(this);
registry->AddInterface<ui::mojom::AcceleratorRegistrar>(this);
if (remote_identity.name() == "mojo:mash_session") {
connector()->ConnectToInterface(remote_identity, &session_);
@@ -171,6 +173,16 @@ void WindowManagerApplication::Create(
}
void WindowManagerApplication::Create(
+ const ::shell::Identity& remote_identity,
+ ash::mojom::WallpaperControllerRequest request) {
+ ash::mojom::WallpaperController* wallpaper_controller =
+ static_cast<WallpaperDelegateMus*>(WmShell::Get()->wallpaper_delegate());
+ DCHECK(wallpaper_controller);
+ wallpaper_controller_bindings_.AddBinding(wallpaper_controller,
+ std::move(request));
+}
+
+void WindowManagerApplication::Create(
const shell::Identity& remote_identity,
ui::mojom::AcceleratorRegistrarRequest request) {
if (!window_manager_->window_manager_client())

Powered by Google App Engine
This is Rietveld 408576698