From e70cf0ed41432b87472fcfb7afda83c86091f0be Mon Sep 17 00:00:00 2001 From: "bshe@chromium.org" Date: Thu, 15 Mar 2012 16:24:47 +0000 Subject: Retry landing "Enable users change desktop background image from settings page in Chromeos Aura build" Enable user change background image in settings page in Aura build. Only support change between default background images currently. This is a second try to land, last time it fails on win_aura build. The original CL is here: http://codereview.chromium.org/9580023/ TBR=flackr,ben,jhawkins BUG=105508 TEST=Go to settings page and click "set wallpaper" button to change background image. Review URL: https://chromiumcodereview.appspot.com/9703031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126923 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/accelerators/accelerator_controller.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'ash/accelerators') diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc index 0eb7ce8..b43b5f4 100644 --- a/ash/accelerators/accelerator_controller.cc +++ b/ash/accelerators/accelerator_controller.cc @@ -5,6 +5,7 @@ #include "ash/accelerators/accelerator_controller.h" #include "ash/accelerators/accelerator_table.h" +#include "ash/desktop_background/desktop_background_controller.h" #include "ash/ash_switches.h" #include "ash/caps_lock_delegate.h" #include "ash/ime_control_delegate.h" @@ -90,11 +91,13 @@ bool HandleRotateScreen() { } bool HandleToggleDesktopBackgroundMode() { - ash::Shell* shell = ash::Shell::GetInstance(); - if (shell->desktop_background_mode() == ash::Shell::BACKGROUND_IMAGE) - shell->SetDesktopBackgroundMode(ash::Shell::BACKGROUND_SOLID_COLOR); + ash::DesktopBackgroundController* desktop_background_controller = + ash::Shell::GetInstance()->desktop_background_controller(); + if (desktop_background_controller->desktop_background_mode() == + ash::DesktopBackgroundController::BACKGROUND_IMAGE) + desktop_background_controller->SetDesktopBackgroundSolidColorMode(); else - shell->SetDesktopBackgroundMode(ash::Shell::BACKGROUND_IMAGE); + desktop_background_controller->SetPreviousDesktopBackgroundImage(); return true; } -- cgit v1.1