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

Unified Diff: chrome/browser/ui/ash/launcher/launcher_context_menu.cc

Issue 2413503002: Cleanup mojo Wallpaper interfaces for mash. (Closed)
Patch Set: Sync and rebase again... Created 4 years, 2 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/ui/ash/launcher/launcher_context_menu.cc
diff --git a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
index 1e6efb3fa47d6cbf6bc05abaf94420e9d48c2868..f7a57c677e0a57f6373841e6b184893eef8ceeb4 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
@@ -26,6 +26,10 @@
#include "components/prefs/pref_service.h"
#include "content/public/common/context_menu_params.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
+#endif // defined(OS_CHROMEOS)
+
namespace {
// Returns true if the user can modify the |shelf|'s auto-hide behavior.
@@ -95,9 +99,13 @@ bool LauncherContextMenu::IsCommandIdEnabled(int command_id) const {
case MENU_PIN:
return controller_->IsPinnable(item_.id);
case MENU_CHANGE_WALLPAPER:
+#if defined(OS_CHROMEOS)
return ash::WmShell::Get()
->wallpaper_delegate()
->CanOpenSetWallpaperPage();
+#else
+ return false;
+#endif // defined(OS_CHROMEOS)
case MENU_AUTO_HIDE:
return CanUserModifyShelfAutoHideBehavior(controller_->profile());
default:
@@ -137,7 +145,9 @@ void LauncherContextMenu::ExecuteCommand(int command_id, int event_flags) {
case MENU_ALIGNMENT_MENU:
break;
case MENU_CHANGE_WALLPAPER:
- ash::WmShell::Get()->wallpaper_delegate()->OpenSetWallpaperPage();
+#if defined(OS_CHROMEOS)
+ chromeos::WallpaperManager::Get()->Open();
+#endif // defined(OS_CHROMEOS)
break;
default:
NOTREACHED();
« no previous file with comments | « chrome/browser/ui/ash/chrome_wallpaper_manager.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698