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

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

Issue 11092034: Add Wallpaper option to launcher context menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace, Null Check, Comment Update Created 8 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
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e52f2b4c6c66df97a5a4d9397467c289e1575cb8..d1e5914476b31be7fd8a180ad352a99108845afa 100644
--- a/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_context_menu.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
+#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/launcher/launcher_context_menu.h"
#include "ash/shell.h"
#include "base/command_line.h"
@@ -99,6 +100,8 @@ LauncherContextMenu::LauncherContextMenu(ChromeLauncherController* controller,
IDS_AURA_LAUNCHER_CONTEXT_MENU_POSITION,
&alignment_menu_);
}
+ AddItem(MENU_CHANGE_WALLPAPER,
+ l10n_util::GetStringUTF16(IDS_AURA_SET_DESKTOP_WALLPAPER));
}
LauncherContextMenu::~LauncherContextMenu() {
@@ -130,6 +133,9 @@ bool LauncherContextMenu::IsCommandIdEnabled(int command_id) const {
case MENU_PIN:
return item_.type == ash::TYPE_PLATFORM_APP ||
controller_->IsPinnable(item_.id);
+ case MENU_CHANGE_WALLPAPER:
+ return ash::Shell::GetInstance()->user_wallpaper_delegate()->
+ CanOpenSetWallpaperPage();
default:
return extension_items_->IsCommandIdEnabled(command_id);
}
@@ -180,6 +186,10 @@ void LauncherContextMenu::ExecuteCommand(int command_id) {
break;
case MENU_ALIGNMENT_MENU:
break;
+ case MENU_CHANGE_WALLPAPER:
+ ash::Shell::GetInstance()->user_wallpaper_delegate()->
+ OpenSetWallpaperPage();
+ break;
default:
extension_items_->ExecuteCommand(command_id, NULL,
content::ContextMenuParams());
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698