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

Unified Diff: chrome/browser/chromeos/arc/wallpaper/arc_wallpaper_service.cc

Issue 2738133003: Promotes a handful of members from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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: chrome/browser/chromeos/arc/wallpaper/arc_wallpaper_service.cc
diff --git a/chrome/browser/chromeos/arc/wallpaper/arc_wallpaper_service.cc b/chrome/browser/chromeos/arc/wallpaper/arc_wallpaper_service.cc
index 9cb023b806ac8a80bf044541f9ddb474571634a4..2bcb3aafc7028f87972baa6d3f2a61d4521a8c03 100644
--- a/chrome/browser/chromeos/arc/wallpaper/arc_wallpaper_service.cc
+++ b/chrome/browser/chromeos/arc/wallpaper/arc_wallpaper_service.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/chromeos/arc/wallpaper/arc_wallpaper_service.h"
#include "ash/common/wallpaper/wallpaper_controller.h"
-#include "ash/common/wm_shell.h"
+#include "ash/shell.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/task_scheduler/post_task.h"
@@ -67,10 +67,9 @@ std::vector<uint8_t> EncodeImagePng(const gfx::ImageSkia image) {
}
ash::WallpaperController* GetWallpaperController() {
- ash::WmShell* wm_shell = ash::WmShell::Get();
- if (!wm_shell)
+ if (!ash::Shell::HasInstance())
return nullptr;
- return wm_shell->wallpaper_controller();
+ return ash::Shell::GetInstance()->wallpaper_controller();
}
} // namespace
@@ -97,7 +96,7 @@ void ArcWallpaperService::OnInstanceReady() {
ARC_GET_INSTANCE_FOR_METHOD(arc_bridge_service()->wallpaper(), Init);
DCHECK(wallpaper_instance);
wallpaper_instance->Init(binding_.CreateInterfacePtrAndBind());
- ash::WmShell::Get()->wallpaper_controller()->AddObserver(this);
+ ash::Shell::GetInstance()->wallpaper_controller()->AddObserver(this);
}
void ArcWallpaperService::OnInstanceClosed() {
@@ -116,7 +115,8 @@ void ArcWallpaperService::SetWallpaper(const std::vector<uint8_t>& data) {
void ArcWallpaperService::GetWallpaper(const GetWallpaperCallback& callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- ash::WallpaperController* wc = ash::WmShell::Get()->wallpaper_controller();
+ ash::WallpaperController* wc =
+ ash::Shell::GetInstance()->wallpaper_controller();
gfx::ImageSkia wallpaper = wc->GetWallpaper();
base::PostTaskWithTraitsAndReplyWithResult(
FROM_HERE, base::TaskTraits().MayBlock().WithPriority(

Powered by Google App Engine
This is Rietveld 408576698