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

Unified Diff: ash/mus/wallpaper_delegate_mus.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/wallpaper_delegate_mus.cc
diff --git a/ash/sysui/wallpaper_delegate_mus.cc b/ash/mus/wallpaper_delegate_mus.cc
similarity index 88%
rename from ash/sysui/wallpaper_delegate_mus.cc
rename to ash/mus/wallpaper_delegate_mus.cc
index 2833e4b3520fc0ef2b2f488669ee250bba904e91..290144249253118f93af6e9a40637e562b2827e1 100644
--- a/ash/sysui/wallpaper_delegate_mus.cc
+++ b/ash/mus/wallpaper_delegate_mus.cc
@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/sysui/wallpaper_delegate_mus.h"
+#include "ash/mus/wallpaper_delegate_mus.h"
#include "ash/common/wallpaper/wallpaper_controller.h"
#include "ash/common/wm_shell.h"
#include "components/wallpaper/wallpaper_layout.h"
#include "services/shell/public/cpp/connector.h"
-#include "ui/views/mus/window_manager_connection.h"
#include "ui/wm/core/window_animations.h"
namespace {
+// TODO(msw): Use enum traits instead.
wallpaper::WallpaperLayout WallpaperLayoutFromMojo(
ash::mojom::WallpaperLayout layout) {
switch (layout) {
@@ -32,9 +32,9 @@ wallpaper::WallpaperLayout WallpaperLayoutFromMojo(
} // namespace
namespace ash {
-namespace sysui {
-WallpaperDelegateMus::WallpaperDelegateMus() {}
+WallpaperDelegateMus::WallpaperDelegateMus(shell::Connector* connector)
+ : connector_(connector) {}
WallpaperDelegateMus::~WallpaperDelegateMus() {}
@@ -65,8 +65,7 @@ void WallpaperDelegateMus::InitializeWallpaper() {
void WallpaperDelegateMus::OpenSetWallpaperPage() {
mojom::WallpaperManagerPtr wallpaper_manager;
- auto* connector = views::WindowManagerConnection::Get()->connector();
- connector->ConnectToInterface("exe:chrome", &wallpaper_manager);
+ connector_->ConnectToInterface("exe:chrome", &wallpaper_manager);
wallpaper_manager->Open();
}
@@ -88,5 +87,4 @@ void WallpaperDelegateMus::SetWallpaper(const SkBitmap& wallpaper,
image, WallpaperLayoutFromMojo(layout));
}
-} // namespace sysui
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698