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

Unified Diff: ash/accelerators/accelerator_controller_delegate_aura.cc

Issue 2290473004: Rename ash desktop_background to wallpaper. (Closed)
Patch Set: Cleanup Created 4 years, 4 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 | « no previous file | ash/ash.gyp » ('j') | ash/common/accelerators/accelerator_table.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller_delegate_aura.cc
diff --git a/ash/accelerators/accelerator_controller_delegate_aura.cc b/ash/accelerators/accelerator_controller_delegate_aura.cc
index efc09f6610e5eef2fee77d3bfe6678f9574515a1..aca43e830c3d28d94cb1c716824878292f8ee417 100644
--- a/ash/accelerators/accelerator_controller_delegate_aura.cc
+++ b/ash/accelerators/accelerator_controller_delegate_aura.cc
@@ -31,7 +31,6 @@
#include "ash/common/wm/wm_event.h"
#include "ash/common/wm_shell.h"
#include "ash/debug.h"
-#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/display/display_manager.h"
#include "ash/display/window_tree_host_manager.h"
#include "ash/host/ash_window_tree_host.h"
@@ -44,6 +43,7 @@
#include "ash/shell.h"
#include "ash/touch/touch_hud_debug.h"
#include "ash/utility/screenshot_controller.h"
+#include "ash/wallpaper/wallpaper_controller.h"
#include "ash/wm/power_button_controller.h"
#include "ash/wm/window_state_aura.h"
#include "ash/wm/window_util.h"
@@ -287,26 +287,26 @@ gfx::ImageSkia CreateWallpaperImage(SkColor fill, SkColor rect) {
return gfx::ImageSkia(canvas.ExtractImageRep());
}
-void HandleToggleDesktopBackgroundMode() {
+void HandleToggleWallpaperMode() {
static int index = 0;
- DesktopBackgroundController* desktop_background_controller =
- Shell::GetInstance()->desktop_background_controller();
+ WallpaperController* wallpaper_controller =
+ Shell::GetInstance()->wallpaper_controller();
switch (++index % 4) {
case 0:
ash::WmShell::Get()->wallpaper_delegate()->InitializeWallpaper();
break;
case 1:
- desktop_background_controller->SetWallpaperImage(
+ wallpaper_controller->SetWallpaperImage(
CreateWallpaperImage(SK_ColorRED, SK_ColorBLUE),
wallpaper::WALLPAPER_LAYOUT_STRETCH);
break;
case 2:
- desktop_background_controller->SetWallpaperImage(
+ wallpaper_controller->SetWallpaperImage(
CreateWallpaperImage(SK_ColorBLUE, SK_ColorGREEN),
wallpaper::WALLPAPER_LAYOUT_CENTER);
break;
case 3:
- desktop_background_controller->SetWallpaperImage(
+ wallpaper_controller->SetWallpaperImage(
CreateWallpaperImage(SK_ColorGREEN, SK_ColorRED),
wallpaper::WALLPAPER_LAYOUT_CENTER_CROPPED);
break;
@@ -364,7 +364,7 @@ bool AcceleratorControllerDelegateAura::HandlesAction(
// NOTE: When adding a new accelerator that only depends on //ash/common code,
// add it to accelerator_controller.cc instead. See class comment.
switch (action) {
- case DEBUG_TOGGLE_DESKTOP_BACKGROUND_MODE:
+ case DEBUG_TOGGLE_WALLPAPER_MODE:
James Cook 2016/08/30 05:18:19 nit: alphabetize, here and below
msw 2016/08/30 16:07:59 Done.
case DEBUG_TOGGLE_DEVICE_SCALE_FACTOR:
case DEBUG_TOGGLE_ROOT_WINDOW_FULL_SCREEN:
case DEBUG_TOGGLE_SHOW_DEBUG_BORDERS:
@@ -422,7 +422,7 @@ bool AcceleratorControllerDelegateAura::CanPerformAction(
const ui::Accelerator& accelerator,
const ui::Accelerator& previous_accelerator) {
switch (action) {
- case DEBUG_TOGGLE_DESKTOP_BACKGROUND_MODE:
+ case DEBUG_TOGGLE_WALLPAPER_MODE:
case DEBUG_TOGGLE_DEVICE_SCALE_FACTOR:
case DEBUG_TOGGLE_ROOT_WINDOW_FULL_SCREEN:
case DEBUG_TOGGLE_SHOW_DEBUG_BORDERS:
@@ -493,8 +493,8 @@ void AcceleratorControllerDelegateAura::PerformAction(
AcceleratorAction action,
const ui::Accelerator& accelerator) {
switch (action) {
- case DEBUG_TOGGLE_DESKTOP_BACKGROUND_MODE:
- HandleToggleDesktopBackgroundMode();
+ case DEBUG_TOGGLE_WALLPAPER_MODE:
+ HandleToggleWallpaperMode();
break;
case DEBUG_TOGGLE_DEVICE_SCALE_FACTOR:
Shell::GetInstance()->display_manager()->ToggleDisplayScaleFactor();
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | ash/common/accelerators/accelerator_table.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698